Hello
I'm currently working on a project, that contains one .net (VB) executable and a C++ (MFC) DLL. Now, what I want to do is to call the functions in the dll out of my managed code
//managed cod
Public Class Win32Call
<StructLayout(LayoutKind.Sequential)>
Class MYSTRUC
Public counter1 As Int6
Public counter2 As Int6
End Clas
Declare Function TestMarshalling Lib "test.dll" (ByVal stats As MYSTRUCT) As Boolea
End Clas
//[...
dim s as New Win32Calls.MYSTRUC
//filling s..
Win32Calls.TestMarshalling(s) '!!!
At this point, the debugger throws a System.NullReferenceException - can anyone tell me why?
Thanks a lo
Jame
P.S.: This is the unmanaged code
typedef struct _MYSTRUCT
__int64 counter1
__int64 counter2
}MYSTRUCT
BOOL TestMarshalling(MYSTRUCT stats
AfxMessageBox("Inside the DLL")
[...