FFSparky has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::API; use strict; use warnings "all"; # MessageBox API - Reference: http://msdn2.microsoft.com/en-us/libra +ry/ms712455.aspx # int MessageBox( # HWND hWnd, # LPCTSTR lpText, # LPCTSTR lpCaption, # UINT uType # ); my $hwndOwner = 0; my $LpszText = "Message Box Text"; my $LpszTitle = "Message Box Title"; my $uStyle = 0; #define MB_OKCANCEL 0x00000001L my $fnMessageBox = new Win32::API("user32", "MessageBox", 'NPPN', 'I') +; my $call1ret = $fnMessageBox->Call($hwndOwner, $LpszText, $LpszTitle, +$uStyle); print "MessageBox Return Code: ".$call1ret."\n"; # SQLAllocHandle API - Reference: http://msdn2.microsoft.com/en-us/l +ibrary/ms712455.aspx # SQLRETURN SQLAllocHandle( # SQLSMALLINT HandleType, # SQLHANDLE InputHandle, # SQLHANDLE * OutputHandlePtr); my $HandleType = 1; my $InputHandle = 0; my $OutputHandlePtr = ''; my $fnSQLAllocHandle = new Win32::API("odbc32", "SQLAllocHandle", 'PPP +', 'I'); my $call2ret = $fnSQLAllocHandle->Call($HandleType, $InputHandle, $Out +putHandlePtr); print "?? ".$^E."\n\n"; print "SQLAllocHandle Return Code: ".$call2ret."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::API Help
by BrowserUk (Patriarch) on Sep 27, 2007 at 23:24 UTC | |
|
Re: Win32::API Help
by almut (Canon) on Sep 27, 2007 at 21:27 UTC | |
|
Re: Win32::API Help
by syphilis (Archbishop) on Sep 27, 2007 at 23:58 UTC | |
|
Re: Win32::API Help
by Anonymous Monk on Sep 28, 2007 at 00:22 UTC | |
|
Re: Win32::API Help
by FFSparky (Acolyte) on Sep 28, 2007 at 02:22 UTC | |
by syphilis (Archbishop) on Sep 28, 2007 at 10:40 UTC | |
by FFSparky (Acolyte) on Sep 28, 2007 at 14:45 UTC | |
|
Re: Win32::API Help
by apl (Monsignor) on Sep 28, 2007 at 09:54 UTC | |
by Corion (Patriarch) on Sep 28, 2007 at 10:00 UTC |