diff options
Diffstat (limited to 'tests/src/Simple/PInvoke/PInvokeNative.cpp')
-rw-r--r-- | tests/src/Simple/PInvoke/PInvokeNative.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/src/Simple/PInvoke/PInvokeNative.cpp b/tests/src/Simple/PInvoke/PInvokeNative.cpp index 90ea1dbff..713fb4435 100644 --- a/tests/src/Simple/PInvoke/PInvokeNative.cpp +++ b/tests/src/Simple/PInvoke/PInvokeNative.cpp @@ -313,13 +313,17 @@ DLL_EXPORT bool __stdcall SafeHandleTest(HANDLE sh, long shValue) DLL_EXPORT long __stdcall SafeHandleOutTest(HANDLE **sh) { - if (sh == NULL) - return -1; - *sh = (HANDLE *)malloc(100); return (long)((size_t)(*sh)); } +DLL_EXPORT long __stdcall SafeHandleRefTest(HANDLE **sh, bool alloc) +{ + if (alloc) + *sh = (HANDLE *)malloc(100); + return (long)((size_t)(*sh)); +} + DLL_EXPORT bool __stdcall ReversePInvoke_Int(int(__stdcall *fnPtr) (int, int, int, int, int, int, int, int, int, int)) { return fnPtr(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) == 55; |