WTB better validation than ValidateArgumentBuffer
-
ValidateArgumentBuffer does not have a "a name" (doesn't expand to ValidateArgumentBuffer_result where "result" is the name of the parameter)
-
Would be nice to have ValidateArgumentBuffer understand structures. ValidateArgumentBuffer_result_some_struct_field(&is_true, sizeof(bool)) would make a KILLING feature!
-
At least ValidateArgumentBuffer should have a way to validate from offset 3, 4 bytes. That would allow validating arguments that are struct fields... in an archaic way, but workable. Maybe this is the easiest to implement proposal :)
The current workaround is to have a "hook_" and register it with REGISTER_GLOBAL_MOCK_HOOK, some global variables and validate inside the hook_ function that the globals match the actual parameters. So maybe thsi suggestion should not be exactly top of the priority list.
Best Regards, Andrei Porumb