1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | #include <stdio.h> |
5 | #include <xplatform.h> |
6 | |
7 | extern "C" DLL_EXPORT BOOL __cdecl Marshal_IUnknown(/*[in]*/IUnknown *o) |
8 | { |
9 | //Call AddRef and Release on the passed IUnknown |
10 | //test if the ref counts get updated as expected |
11 | unsigned long refCount = o->AddRef(); |
12 | if((refCount-1) != o->Release()) |
13 | return FALSE; |
14 | return TRUE; |
15 | } |
16 | |