in reply to Win32::API : Creating a LPCWSTR type input parameter from a string

IIRC, the interface layer wants to do the necessary byte-twiddling (encoding & decoding) for you, so you therefore do not want to (re-)do it yourself.

“Okay, she’s a string.” – with apologies to Bill Murray in Ghostbusters.

Replies are listed 'Best First'.
Re^2: Win32::API : Creating a LPCWSTR type input parameter from a string
by ajose (Acolyte) on Aug 25, 2011 at 16:25 UTC

    Hi, I have done some modifications to my code as per suggestions given earlier. Please find the latest code structure for your reference.

    ['WlanGetProfile' => 'IPNIPPI' => 'I'], $profileName = unpack('J', pack('p', $profileName)); $API{ api}->Call($handle, $interface, $profileName, 0, $profileXml, 0, + 0));

    Error message:

    An attempt was made to reference a token that does not exist at .....