| 32 | #include "util.h" |
| 33 | |
| 34 | void * GetObjectAddr(HookParamType type, unsigned int flags, void **params, size_t offset) |
| 35 | { |
| 36 | #ifdef WIN32 |
| 37 | if (type == HookParamType_Object) |
| 38 | return (void *)((intptr_t)params + offset); |
| 39 | #elif POSIX |
| 40 | if (type == HookParamType_Object && !(flags & PASSFLAG_ODTOR)) //Objects are passed by rrefrence if they contain destructors. |
| 41 | return (void *)((intptr_t)params + offset); |
| 42 | #endif |
| 43 | return *(void **)((intptr_t)params + offset); |
| 44 | |
| 45 | } |
| 46 | |
| 47 | size_t GetStackParamOffset(HookParamsStruct *paramStruct, unsigned int index) |
| 48 | { |
no outgoing calls
no test coverage detected