class NativeMethod
{
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
publicstruct TestStru
{
public Single x;
public Single y;
public Single z;
};
[DllImport("NativeLibrary.dll", EntryPoint = "testReturnStruct")]
publicstaticextern IntPtr testReturnStruct();
[DllImport("NativeLibrary.dll", EntryPoint = "testOutStruct")]
publicstaticexternvoidtestOutStruct(ref TestStru p);
}