unmanaged code structure with a pointer
my unmanaged code contains a structure with a stringpointer. This string pointer should point out to a string buffer
typedef struct dat
{
LPSTR add;
dword a;
}
what is the equivalent declaration in managed code of the above structure?
i've used the following prototype:
public class UserData
{ [ MarshalAs( UnmanagedType.ByValTStr, SizeConst=20000 )]
public string buffer;
public int callcount;
}
but it's not giving me the desired o/p. Is my declaration correct?
please suggest me a way at the earliest.