Hi
I am trying to make to work this unmanaged Function from C to VB.Net
My GetCarList Function returns always 0 (ERROR_NONE=0) but the structures
are all empty.
Can someone help me to resolve this problem, even with an example?
Regards
struct Cars
{
char Name[256]; //car Name. max 255 characters
DWORD Flags;
};
struct CarList
{
DWORD Count; //number of cars
DWORD Current; //current car out
Cars car[200];
};
extern "C" DWORD __stdcall GetCarList(OUTcarlist* carList);
ERROR_NONE=0
Public Structure Cars
Dim Name as string
Dim Flags as integer
End Structure
Public Structure CarList
Dim Count as integer
Dim Current as integer
Dim Cars as car
End Structure
<DllImport("cars.dll", EntryPoint:="GetCarList", _
SetLastError:=True, CharSet:=CharSet.Unicode, _
ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function GetCarList(ByVal MyCarList As CarList) As Int32
--
Message posted via http://www.dotnetmonster.com