Guid - generate, convert(string to struct / struct to string

Post your working scripts, libraries and tools
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Guid - generate, convert(string to struct / struct to string

07 May 2015, 09:16

Simple lib to manage creation and conversion(to/from string) of GUID/CLSID. Related: jNizM's Class & Func GUID / UUID

Create/generate GUID:
oGuid := Guid_New()
  • To retrieve the address of the GUID structure:
    pGuid := oGuid.Ptr OR pGuid := oGuid[]
  • To retrieve the string representation of the GUID:
    sGuid := oGuid.Str

Existing GUID(string or struct):
  • String to GUID struct:
    pGuid := Guid_FromStr( sGuid, ByRef VarOrAddress )
  • GUID struct to string:
    sGuid := Guid_ToStr( ByRef VarOrAddress )

Source (or @GitHub):

Code: [Select all] [Expand] [Download] (Guid.ahk)GeSHi © Codebox Plus

Last edited by Coco on 10 May 2015, 02:01, edited 4 times in total.
User avatar
jNizM
Posts: 2273
Joined: 30 Sep 2013, 01:33
GitHub: jNizM
Contact:

Re: Guid - generate, convert(string to struct / struct to st

07 May 2015, 09:30

Did something simliar few month ago :P
Class Globally unique identifier (GUID) / Universally unique identifier (UUID)

Was my first try with Classes ^^

( I need to rewrite many old codes from me -.- )
[AHK] 1.1.26.01 x64 Unicode | [WIN] 10 Pro (Version 1703) x64
My GitHub Profile | Donations are appreciated if I could help you
Coco
Posts: 771
Joined: 29 Sep 2013, 20:37
GitHub: cocobelgica

Re: Guid - generate, convert(string to struct / struct to st

07 May 2015, 09:57

I was actually using your CreateGUID() function :). Then I needed something that would allow me to retrieve the struct as well (CLSIDFromString) and also something that would allow me to work with existing(retrieved from file or something) GUIDs(string or struct).

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 14 guests