Here's a reply I got offline from the original poster, posted here for archival purposes :)
Thanks for the suggestion, but i determined what my
error was. I defined my RECT structure incorrectly so
that when it was being passed from managed to
unmanaged code, it was being marshalled incorrectly.
The correct definition of RECT:
[StructLayout(LayoutKind.Explicit)]
public struct RECT
{
[FieldOffset(0)] public int left;
[FieldOffset(4)] public int top;
[FieldOffset(8)] public int right;
[FieldOffset(12)] public int bottom;
public RECT(int left, int top, int right, int
bottom)
{
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
}
Sonork ID: 100.11138 - Hasaki