Consider the following struct:
[StructLayout(LayoutKind.Sequential)]
struct CONTEXT
{
public UINT ContextFlags;
unsafe fixed byte unused[160];
public uint Ebx;
public uint Edx;
public uint Ecx;
public uint Eax;
unsafe fixed byte unused2[24];
}
And the following code:
Context ctx = new Context{ ContextFlags = 0x10007 };
Now, I would like to convert this struct representative (ctx) into type int.
int x = (int)ctx;
The above method will not work, can someone think of the correct way for this conversion to take place?
Thank you,
Evan
int?.. I'm missing something probably...