Converting to GUID structue? 
Author Message
 Converting to GUID structue?

Hello all,

      When using the TypeLib to get some data, some of the info comes back
in the form of:
             476D8D0F-381B-11D2-A610-00AA00C14AF9

      And then I want to use that info in a function like:
            FindConnectionPoint(....)

       The first parameter requires a GUID structure, how do I convert that
TypeLib number into a GUID structure?

     TIA,

     Ray K.



Mon, 15 Nov 2004 03:24:39 GMT  
 Converting to GUID structue?
Try UuidFromString().

--
Ajay Kalra [MVP - VC++]


Quote:
> Hello all,

>       When using the TypeLib to get some data, some of the info comes back
> in the form of:
>              476D8D0F-381B-11D2-A610-00AA00C14AF9

>       And then I want to use that info in a function like:
>             FindConnectionPoint(....)

>        The first parameter requires a GUID structure, how do I convert
that
> TypeLib number into a GUID structure?

>      TIA,

>      Ray K.



Mon, 15 Nov 2004 03:35:37 GMT  
 Converting to GUID structue?
Ajay,

     Thanks, almost there, it builds but now I get a link error....

           UUID uID;
           UuidFromString((unsigned
char*)("CE0E92DC-6083-4614-8A28-764E1D5B5359"),&uID);


     ??????
     Ray K.



Mon, 15 Nov 2004 04:10:45 GMT  
 Converting to GUID structue?
Take a look at

            AfxGetClassIDFromString(..) or

            CLSIDFromString()
            CLSIDFromProgID()

--
Cheers
Check Abdoul
----------------


Quote:
> Hello all,

>       When using the TypeLib to get some data, some of the info comes back
> in the form of:
>              476D8D0F-381B-11D2-A610-00AA00C14AF9

>       And then I want to use that info in a function like:
>             FindConnectionPoint(....)

>        The first parameter requires a GUID structure, how do I convert
that
> TypeLib number into a GUID structure?

>      TIA,

>      Ray K.



Mon, 15 Nov 2004 05:11:55 GMT  
 Converting to GUID structue?
As shown in documentation, you need to link against Rpcrt4.lib.

--
Ajay Kalra [MVP - VC++]


Quote:
> Ajay,

>      Thanks, almost there, it builds but now I get a link error....

>            UUID uID;
>            UuidFromString((unsigned
> char*)("CE0E92DC-6083-4614-8A28-764E1D5B5359"),&uID);

>           error LNK2001: unresolved external symbol


Quote:

>      ??????
>      Ray K.



Mon, 15 Nov 2004 05:31:16 GMT  
 Converting to GUID structue?
Thank you guys....

   Both responses worked; score another positive for this newsgroup!!

Ray K.



Mon, 15 Nov 2004 22:18:53 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Convert System.Guid to unmanaged GUID structure>

2. Convert registry GUID to hex GUID

3. Convert String to Guid

4. Is there an API to convert a GUID to a string

5. Converting GUID types

6. Converting GUID's to hex

7. cannot convert string to Guid

8. GUID type support in for ODBC/C++/GUID as replacement for autonumber fields

9. Structue within a structure

10. Structue within a structure

11. GUID question

12. Guid and null values

 

 
Powered by phpBB® Forum Software