in reply to Win32::API : Creating a LPCWSTR type input parameter from a string
Get rid of
$profileName = pack ('p', $profileName);
Win32::API recognises LPCWSTR and should handle it properly.
I could see it passing "t" instead of "test", though. The prototype interface is... troublesome. If that's the case, I'd avoid the prototype interface, define strProfileName as an "N", and pass unpack('J', pack('p', $profileName)).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::API : Creating a LPCWSTR type input parameter from a string
by ajose (Acolyte) on Aug 24, 2011 at 10:06 UTC |