Archive: How to use UuidFromString?


How to use UuidFromString?
System::Alloc 80
System::Alloc 16
System::Call 'rpcrt4::UuidFromStringA(t 'F2649E29-11B2-475F-9DDD-B75CF51D53A9', i sr1) i'

System::Call 'ole32::StringFromGUID2( i r1, i sr2, i 80) i'
System::Call 'kernel32::WideCharToMultiByte(i 0, i 0, i r2, i 80, t .r0, i ${NSIS_MAX_STRLEN}, i 0, i 0) i'
System::Free $1
System::Free $2

; the message box show nothing!?!?!?!?!?!?!?
MessageBox MB_OK $0

Thanks

MK


The System plug-in can handle GUIDs on its own. There's no need in calling UuidFromString on your own.

System::Call 'ole32::CoCreateGuid(g .s)'
Pop $0
MessageBox MB_OK $0
Specifically in your code, the problem is the quoting in the UuidFromStringA call.