Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Win32::API

by RhetTbull (Curate)
on May 23, 2001 at 06:12 UTC ( #82453=note: print w/replies, xml ) Need Help??


in reply to Win32::API

Reference the Win32::API docs. To use a pointer in a Win32 API call, simply pass in an ordinary perl scalar (not a reference, just a scalar). Note however, that you must make sure the scalar is big enough to hold the results. e.g. if the Win32 API call is expecting a pointer to a string and you know the call will put at most 80 chars in the string, initialize the string (perl scalar) like so:
$buffer = " " x 80;
See this writeup on SystemParametersInfo or this one on GetShortPathName for an example of Win32 API calls that take a pointer.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://82453]
help
Chatterbox?
[stevieb]: whale oil beef hooked... Strawberry just implemented a JSON structured Perls Available. That fits right in with what I've done with berrybrew quite well me thinks.
[choroba]: Good morning!
[stevieb]: morning, choroba

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-02-23 03:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (338 votes). Check out past polls.