Skip to content
⌘ NSIS Forum Archive

Custome license unicode error

3 posts

guineapig#

Custome license unicode error

Hi all,
I'm using the CustomLicenseUnicode.dll, but I'm facing some problems: I'm trying to change the license at run time with this piece of code:
    ; change license
    FindWindow $0 "#32770" "" $HWNDPARENT
    GetDlgItem $0 $0 1000
    CustomLicenseUnicode::LoadFile "${TempDir}\$LicenseName" $0 
But when I run it I see a '?' (question mark) as a first letter in front of the license test.
I tried to modify the txt encoding, but it's reproducible with all of them (currently I'm using UCS-2 Little Endian).

I'm using NSIS unicode v2.45 and the latest CustomLicenseUnicode.dll.

Thanks for the help.

Fabio
Anders#
Unicode BOM?

Or use something like:
!include WinMessages.nsh
page license "" ls
function ls
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1000 
FileOpen $1 "${__FILE__}" r
System::Call 'kernel32::GetFileSize(ir1,i0)i.r2'
${If} $2 != -1
    System::Alloc $2
    pop $3
    System::Call 'kernel32::ReadFile(ir1,ir3,ir2,*i,i0)'
    IntOp $2 $3 + 2 ;<-----Skip a couple bytes
    SendMessage $0 ${WM_SETTEXT} 0 $2
    System::Free $3
${EndIf}
FileClose $1