Programmatic Identifier
Membership.GuidGen.1
CLSID
CB7865A2-E677-11D0-BDC7-00C04FB6163F
COM Class Name
GuidGen
Type Library Name
autoobj 1.0 Type Library
Type Library Location
c:\Microsoft Site Server\bin\P&M\autoobj.dll
Threading Model
“Both”
The GuidGen class defines a COM object that can be used to generate GUID values in a scripting environment. This class of object is useful when low-level COM library functions cannot be accessed directly such as in a Windows Scripting Host (WSH) script or an ASP script.
The GuidGen COM class exposes the custom dual interface IGuidGen. Client applications may access the method via the COM interface IGuidGen or through the dispinterface IGuidGen via the IDispatch interface.
This method returns a generated Globally Unique IDentifier when invoked.
IDL Definition
HRESULT GenerateGUID( [out,retval] BSTR* pVal ) ;
Parameters
pVal
on return, the variable contains the GUID value in standard registry format. (e.g. {3050F53D-98B5-11CF-BB82-00AA00BDCE0B})
Return Values
a standard HRESULT value
Example
VBScript in a Windows Scripting Host script
Set IGuidGen = CreateObject("Membership.GuidGen")
GUIDVal = IGuidGen.GenerateGuid