I try to marshal NdisGetCurrentSystemTime
result to a C# program via ioctl.
LARGE_INTEGER data;
NdisGetCurrentSystemTime (&data );
marshal_data->time = (UINT64)(data.QuadPart / 10^6);
DBGPRINT(("Time: %64u", marshal_data->time));
At C# receiver side, the time field is defined as uint64; there's also a couple of other uint64 fields in the marshalled structure. However, when doing
String.Format(("Time was {0}", recv_data->time))
I get unexpectedly large number that differs from the one in DBGPRINT.
C#:
[StructLayout(LayoutKind.Sequential)]
...
public UInt64 time
C:
struct _marshalme {
...
UINT64 time
...
}
Is there anything going weird with a byte order?