Archive: Calling a dll - Convert string to LPCWSTR


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


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...


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.