I've just converted a VS2003 application to VS2005, and a PInvoke call to
AdjustWindowRect which apparently worked fine in VS2003 is pulling a runtime
error under VS 2005, as follows:
A call to PInvoke function
'Graphics!DSC.Utilities.Graphics.Win32RECT::AdjustWindowRect' has unbalanced
the stack. This is likely because the managed PInvoke signature does not
match the unmanaged target signature. Check that the calling convention and
parameters of the PInvoke signature match the target unmanaged signature.
My declaration for AdjustWindowRect looks like this:
[DllImport("user32.dll", EntryPoint="AdjustWindowRect")]
public static extern bool AdjustWindowRect(ref Win32RECT clientCorners,
ulong dwStyle, bool bMenu);
my Win32RECT struct, which is impersonating a Windows API RECT struct looks
in part like this:
Tom Dacon - 03 Jul 2006 00:25 GMT
Please disregard. I hit some keystroke that sent this before it was
complete.
> I've just converted a VS2003 application to VS2005, and a PInvoke call to
> AdjustWindowRect which apparently worked fine in VS2003 is pulling a
[quoted text clipped - 15 lines]
> my Win32RECT struct, which is impersonating a Windows API RECT struct
> looks in part like this: