Hi there,
i have the following problem with a 3. party dll:
c++ function with the following structures:
typedef struct
{ uint16 szUserId[ID_SZ_SIZE]; // null terminated 23 char User id for this
user - should be unique
} ts_USER
typedef struct
{ uint32 uiSizeBytes; // size in bytes pf entire returned list, including
structure parameters
uint32 uiNumUsers; // number of users returned in list
ts_USER asUser[1];
} ts_ALL_USERS
Result_Code GetListOfAllUsers(ts_ALL_USERS** ppUserList) // ppUserList: a
pointer to receive the user list pointer
I declared the structure in VB(i build one structure ?!):
<StructLayout(LayoutKind.Sequential)> _
Public Structure ts_ALL_USERS
Public uiSizeBytes As UInt32
Public uiNumUsers As UInt32
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=23)> _
Public szUserID() As UInt16
End Structure
Public Declare Auto Function GetListOfAllUsers Lib "c:\windows\system32\
atsc63.dll" Alias "GetListOfAllUsers" (ByVal AT_User As ts_ALL_USERS) As
Int16
I don't know, how to marshal the parameter.
i know, that it's wrong:
Dim AT_USERS As New ts_ALL_USERS
Erfolg = GetListOfAllUsers(AT_USERS)
but i don't know, how it's right.
Thanks for help.
--
Message posted via
http://www.dotnetmonster.com