A quick look suggests everything is ok. I am trying to identify the problem.
I suggest you use the ColorTranslator class rather than bit shifting.
System.Drawing.ColorTranslator.ToWin32((uint)Color .Red)
In your GM_AreaStyle_t structure, make sure the size of the structure is correct. You can check the size of the same structure in the C++ sample by getting the value of
sizeof(GM_AreaStyle_t).
The size being reported must be the same as
Marshal.SizeOf(typeof(GM_AreaStyle_t))
If the two are not the same, then you have to fix that ASAP as it can lead to memory issues that can affect the entire program later.
|