![]() |
#1 |
Junior Member
Join Date: Jan 2013
Posts: 6
|
![]()
I have a legacy custom DLL that I need to call from my installer that uses ANSI character strings for parameters. Now I want to move to using the Unicode version of NSIS v3, but I can't easily recompile the DLL to support wide characters.
I've been searching for a way to pass single byte strings to and from the DLL and then convert to Unicode for use within NSIS, but I haven't found a clear answer. Is "CallAnsiPlugin" any use for what I need? The sample code is pretty unclear to me. Any pointers are much appreciated. |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The CallAnsiPlugin plug-in is what you need to use. What is not clear from the example?
Stu |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jan 2013
Posts: 6
|
Maybe it's best to show what I had been using before with my DLL:
code: How would I accomplish the same thing with CallAnsiPlugin? Maybe something like this? code: |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Jan 2013
Posts: 6
|
I should point out that my dll is not an NSIS plugin DLL. It's just a plain Win32 DLL that copies a string into the parameter.
|
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
|
CallAnsiPlugin only works for NSIS plugins.
The System plugin will work, you just have to use the correct string type and in your case just change (t) to (m). m = char* w = wchar_t* t = TCHAR* / LPTSTR IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Jan 2013
Posts: 6
|
![]()
Wow that is perfect! Thanks! I like those simple kinds of fixes
![]() |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Feb 2022
Posts: 1
|
ANSI to Unicode
Try ANSI to Unicode Migration Tool solution to import ANSI file to Unicode Cloud environment. With an easy and secure connection to Exchange Online in presence of the Internet, it effortlessly uploads ANSI data to Unicode Platform. Supports all versions of Windows OS and Outlook data files. Embedded with high-tech features to provide accurate ANSI to Unicode.
Visit at : https://www.osttopstapp.com/ansi-to-unicode-pst.html |
![]() |
![]() |
![]() |
|
Tags |
unicode dll ansi string |
Thread Tools | Search this Thread |
Display Modes | |
|
|