Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   How to use UuidFromString? (http://forums.winamp.com/showthread.php?t=267326)

MalaKobyla 7th March 2007 16:50

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

kichik 7th March 2007 18:03

The System plug-in can handle GUIDs on its own. There's no need in calling UuidFromString on your own.
code:
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.


All times are GMT. The time now is 04:17.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.