0

この関数を C# からエクスポートしたい:

HRESULT VCAPITYPE VirtualChannelGetInstance(
 _In_    REFIID refiid,
 _Inout_ ULONG  *pNumObjs,
 _Out_   VOID   **ppObjArray
);

次のコードを試しました:

public static uint VirtualChannelGetInstance(IntPtr refiid, ref uint pNumObjs, ref IntPtr[] ppObjArray)  
{
      MessageBox.Show("VirtualChannelGetInstance ");
      return 0; 
}

The problem is when this exported funciton from C# is called, I always get nullreference exception. What could be a problem?

4

1 に答える 1

0

VirtualChannelGetInstance 宣言を変更して、これを機能させました。

public static uint VirtualChannelGetInstance(Guid refiid, ref ulong pNumObjs, void** ppObjArray)
于 2015-06-15T13:42:49.967 に答える