Win32::API LPTSTR
by Cafs other posts by this author
May 20 2005 10:39AM messages near this date
view in the new Beta List Site
Out of Office
|
Re: Win32::API LPTSTR
Not sure if this is a resend, I needed to subscribe to this list:
I am trying to use Win32::API to import by prototype only;
of the functions I have tried the ones with type LPTSTR fail;
I would like to just use the prototypes because if its packing functions
Win32::API::Struct and Win32::API::Type - see the example in API.pm
example
use Win32::API;
#DWORD GetTempPath(
# DWORD ccBuffer,
# LPTSTR lpszBuffer
#);
#Win32::API-> Import("kernel32", "DWORD GetTempPath(DWORD ccBuffer, LPTSTR lpszBuffer)",);
#this fails and causes generic a windows error when GetTempPath() is called
Win32::API-> Import('kernel32', 'GetTempPath', 'NP', 'N');
#this of course works, but I would like to use the prototype
#the example at the end of API.pm demonstrates using the prototype
$lpszBuffer = " " x 80;
GetTempPath(80, $lpszBuffer);
print $lpszBuffer;
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Cafs
$Bill Luebkert
Lloyd Sartor
|