Skip to content
⌘ NSIS Forum Archive

Calling a dll - Convert string to LPCWSTR

3 posts

dlloyd#

Calling a dll - Convert string to LPCWSTR

I need call an external dll and pass it a LPCWSTR. Is there a way to use system.dll to convert a NSIS string to a wide char?

Dan
LoRd_MuldeR#
Why not simply pass an ANSI string to the DLL and convert it to a Wide string inside the DLL? I think the interface of NSIS Plugin DLL's is defined with ANSI strings, so it may be difficult to pass a Wide string. I may be mistaken here, I only used the Delphi/Pascal interface...
kichik#
It's actually quite easy to pass wide strings to a DLL. Simply use `w' instead of `t' and the System plug-in will do the work for you.