in reply to Win32::API Help
If you used strict and warning, and fixed your code to avoid the first bunch of errors, then you'll get this set of errors:
c:\test>junk syntax error at c:\test\junk.pl line 34, near "$OutputHandlePtr;" Bareword "null" not allowed while "strict subs" in use at c:\test\junk +.pl line 13. Bareword "N" not allowed while "strict subs" in use at c:\test\junk.pl + line 18. Bareword "P" not allowed while "strict subs" in use at c:\test\junk.pl + line 18. Bareword "P" not allowed while "strict subs" in use at c:\test\junk.pl + line 18. Bareword "N" not allowed while "strict subs" in use at c:\test\junk.pl + line 18. Bareword "I" not allowed while "strict subs" in use at c:\test\junk.pl + line 18. Bareword "null" not allowed while "strict subs" in use at c:\test\junk +.pl line 32. Bareword "N" not allowed while "strict subs" in use at c:\test\junk.pl + line 33. Bareword "N" not allowed while "strict subs" in use at c:\test\junk.pl + line 33. Bareword "P" not allowed while "strict subs" in use at c:\test\junk.pl + line 33. Bareword "N" not allowed while "strict subs" in use at c:\test\junk.pl + line 33. Execution of c:\test\junk.pl aborted due to compilation errors.
And if you pay particular attention to the two 'Bareword "null"' messages, then you might get somewhere.
Also, it is often, but not always useful, to print $^E in a string context if the api call fails.
Update: If you are using AS perl, then take a look at the html pod for the package Win32, wher eyou will find that MessageBox() is available without using Win32::API.
Win32::MsgBox(MESSAGE [, FLAGS [, TITLE]])
|
|---|