PInvoke and AdjustWindowRect

T

Tom Dacon

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:
 
T

Tom Dacon

Please disregard. I hit some keystroke that sent this before it was
complete.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top