G
Guest
Hello
I'm currently developing 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 code (the .net executable
Public Class TestClas
<StructLayout(LayoutKind.Sequential)>
Class ANYSTRUC
Public counter1 As Int6
Public counter2 As Int6
End Clas
Declare Function MyTest Lib "test.dll" (ByVal param As ANYSTRUCT) As Boolea
End Clas
//[...
dim s as New TestClass.ANYSTRUC
//filling s with data..
TestClass.MyTest(s) '!!!
At this point, the debugger throws a System.NullReferenceException I cannot understand. Can anyone
Thanks a lo
Andrea
P.S.: This is the unmanaged code (in the MFC Dll)
typedef struct _ANYSTRUCT
__int64 counter1
__int64 counter2
}ANYSTRUCT
BOOL MyTest(ANYSTRUCT param
[...
}
I'm currently developing 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 code (the .net executable
Public Class TestClas
<StructLayout(LayoutKind.Sequential)>
Class ANYSTRUC
Public counter1 As Int6
Public counter2 As Int6
End Clas
Declare Function MyTest Lib "test.dll" (ByVal param As ANYSTRUCT) As Boolea
End Clas
//[...
dim s as New TestClass.ANYSTRUC
//filling s with data..
TestClass.MyTest(s) '!!!
At this point, the debugger throws a System.NullReferenceException I cannot understand. Can anyone
Thanks a lo
Andrea
P.S.: This is the unmanaged code (in the MFC Dll)
typedef struct _ANYSTRUCT
__int64 counter1
__int64 counter2
}ANYSTRUCT
BOOL MyTest(ANYSTRUCT param
[...
}