The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: donkey on September 19, 2009, 08:24:36 PM

Title: Convert string to guid
Post by: donkey on September 19, 2009, 08:24:36 PM
I'm looking for an API function that converts a string GUID to a numeric GUID structure, can't seem to find one but I would assume that there must be one. The strings are read from the registry in the format {2A75196C-D9EB-4129-B803-931327F72D5C} and I need to convert it to a usable GUID structure. Failing a Windows API function I guess I will have to write my own but its a PITA to have to write the parser and all of the ascii to hex supporting functions for a function that's only executed once and is optional.

Edgar
Title: Re: Convert string to guid
Post by: Ossa on September 19, 2009, 08:40:27 PM
Hi,

perhaps use CLSIDFromString? I think it should work... give it a go.

Ossa
Title: Re: Convert string to guid
Post by: donkey on September 19, 2009, 09:14:50 PM
Thanks Ossa,

missed that one combing through MSDN, it works fine.

Edgar