J
juergen
Hello everyone,
I can't get that to work and I don't know why.
Simplified I have the following structs (Just a snip):
typedef struct
{
char* name;
int type;
Parameters1 otherStruct;
Parameters2 otherStruct2;
unsigned int lastUsed;
} TestStruct,*PTestStruct;
typedef struct Parameters1
{
Parameters3 otherStruct3;
Parameters4 otherStruct4
}Parameters1;
.......
I tried this C# class for that:
[StructLayout(LayoutKind.Sequential)]
public class TestStruct
{
[MarshalAs(UnmanagedType.LPStr)] public string name;
public int type;
public Parameters1 otherStruct;
public Parameters2 otherStruct2
public uint lastUsed;
}
But it doesn't work.
Any idea what's going wrong here?
Thanks.
greetings juergen
I can't get that to work and I don't know why.
Simplified I have the following structs (Just a snip):
typedef struct
{
char* name;
int type;
Parameters1 otherStruct;
Parameters2 otherStruct2;
unsigned int lastUsed;
} TestStruct,*PTestStruct;
typedef struct Parameters1
{
Parameters3 otherStruct3;
Parameters4 otherStruct4
}Parameters1;
.......
I tried this C# class for that:
[StructLayout(LayoutKind.Sequential)]
public class TestStruct
{
[MarshalAs(UnmanagedType.LPStr)] public string name;
public int type;
public Parameters1 otherStruct;
public Parameters2 otherStruct2
public uint lastUsed;
}
But it doesn't work.
Any idea what's going wrong here?
Thanks.
greetings juergen