Next Previous Up Top Contents Index

8.3 GUID utilities

as <REFGUID> string => GUID

G.f. method

Summary

Calls the Microsoft library function CLSIDFromString to convert string to a GUID.

Signature

as <REFGUID> string => GUID 

Arguments

<REFGUID>
The class name <REFGUID>.

string
An instance of <string>.

Values

GUID
An instance of <REFGUID>.

Description

Calls the Microsoft library function CLSIDFromString to convert string to a GUID. The string can represent the GUID in one of two forms. The first form is the standard hexadecimal string form, as follows:

  "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" 

For example:

  "{113f2c00-f87b-11cf-89fd-02070119f639}"

The enclosing braces are a required part of the syntax; letters may be either upper or lower case.

The second form is as a programmatic identifier or Prog ID -- a registered, unique symbolic alias for a numeric GUID. The Prog ID is looked up in the Windows registry and the corresponding GUID is returned.

This function signals an error if the string is not in the expected format, and cannot be found in the registry either.

The value returned is a C structure pointer, so when you are finished with it you must call the function destroy on it to ensure that the memory it uses is recycled.


OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index