ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved