Win32::API treats the "P" prototype as "any" pointer - it is opaque to Win32::API and you need to post-process the value with pack>/tt> and unpack. This is not as nice as it could be, but as you are interfacing with C-level subroutines anyway, some knowledge about the stuff is needed anyway. You might have success by using the C-prototype version of Win32::API, that tries to interpret the C-prototypes of functions, but then you would need to find a way to tell Win32::API what a hFOO is without Win32::API having access to the relevant include and header files. See Convert::Binary::C for a module that does this task, and also for how ugly that way is, as Convert::Binary::C needs to implement its own C preprocessor for tracing the include statements of header files.
In reply to Re^5: Passing/Returning HANDLE's with Win32::API
by Corion
in thread Passing/Returning HANDLE's with Win32::API
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |