I have an NSIS script that run external program, this program returns C++ type HRESULT (unsigned int32) and NSIS operates with this value as signed int32. And I need to spent time to convert value correctly.
Is there simple way to do this automatically in NSIS script?
Update: Solution is to convert value with NSIS command like this
IntFmt $0 “0x%X” $0
NSIS variables are strings but they are converted to numbers internally when required.
You can use
IntCmpU($0 U>= $1 etc in LogicLib syntax) to compare unsigned numbers andIntFmtto format a number any way you like…..and HRESULT should be treated as signed; <0 for errors, 0=S_OK and >0 for S_FALSE and counts.