Page 1 of 1

Better GUID macro

Posted: Sun Feb 10, 2008 1:38 pm
by Trond
This macro only requires you to replace the -'s with commas.

Code: Select all

Macro GUID(name, l1, w1, w2, b1b2, brest) 
  DataSection
  name:
    Data.l $l1
    Data.w $w1, $w2
    Data.b $b1b2 >> 8, $b1b2 & $FF
    Data.b $brest >> 40 & $FF
    Data.b $brest >> 32 & $FF
    Data.b $brest >> 24 & $FF
    Data.b $brest >> 16 & $FF
    Data.b $brest >> 8 & $FF
    Data.b $brest & $FF
  EndDataSection
EndMacro

GUID(CLSID_Test, 332C4425, 26CB, 11D0, B483, 00C04FD90119)

Posted: Sun Feb 10, 2008 3:36 pm
by SFSxOI
Whats the difference in use of this macro and just defining the GUID in a DataSection? Advantages - disadvantages?

Thanks :)

Posted: Sun Feb 10, 2008 3:43 pm
by Trond
You don't have to split up the last number by hand. (It's for the lazy among us :wink: )

Posted: Sun Feb 10, 2008 9:56 pm
by SFSxOI
Oh ...well...DuH!...LoL....I kept trying to find some advantage and disadvantage with it in trying to answer my own question...never even thought of the simple answer you gave ...LoL :)