Hi!.... I have this problem with TrackPopupMenu... When I try to popup a menu it returns an error message:
code:
Bad calling convention detected for "TrackPopupMenu" in "user32". The function must be declared with __stdcall and called with the appropriate number of parameter.
What could be wrong? Here is the code i've used.... and yes, the constants are defined.
code:
hMenu = Interop.Call('user32', 'CreatePopupMenu');
Interop.Call('user32', 'AppendMenuW', hMenu, MF_STRING, 301, 'Test');
var POINTAPI = Interop.Allocate( 8);
Interop.Call('user32', 'GetCursorPos', POINTAPI);
ret = Interop.Call('user32','TrackPopupMenu', hMenu, 0, POINTAPI.ReadDWORD(0), POINTAPI.ReadDWORD(4), Wnd.Handle, 0);
Thanks!