in reply to Re^2: Low-level version of Win32::API::Struct
in thread Low-level version of Win32::API::Struct
should bemy $getCursor = new Win32::API('user32', 'GetCursorPos','S','N');
since $lpPoint is a scalar string formally. 'S'/'T' are only for ::Struct objects. The result of pack() is a scalar string. Not a blessed object. If you had a newer version of ::API, you would get a proper croak messagemy $getCursor = new Win32::API('user32', 'GetCursorPos','P','N');
much better than 0.68 blindly doing ->Pack() on whatever scalar happens to fall in as argument which is what is happening in your case.croak("Win32::API::Call: parameter %d must be +a%s", i+1, " Win32::API::Struct object!\n");
|
|---|