Index   Commented   Search   About

CLSIDFromProgID

Looks up a CLSID from a ProgID in the registry.

HRESULT CLSIDFromProgID(

LPCOLESTR lpszProgID,
//Points to the ProgID whose CLSID is requested
LPCLSID pclsid
//Receives a pointer to the created CLSID
);

Parameters

lpszProgID

Points to the ProgID whose CLSID is requested.

pclsid

Receives a pointer to the location of the created CLSID on return.

Return Values

S_OK

Indicates the CLSID was created successfully.

CO_E_CLASSSTRING

Indicates the registered CLSID for the ProgID is invalid.

REGDB_E_WRITEREGDB

Indicates an error occurred writing to the registry.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

Indicates one or more arguments are invalid.

E_UNEXPECTED

Indicates an unexpected error occurred.

Comments

Given a ProgID, CLSIDFromProgID looks up its associated CLSID from a ProgID in the registry. If the ProgID cannot be found in the registry, CLSIDFromProgID creates an OLE 1 CLSID for it. Because of the restrictions placed on OLE 1 CLSID values, CLSIDFromProgID and CLSIDFromString are the only two functions that can be used to generate a CLSID for an OLE 1 object.

See Also

ProgIDFromCLSID

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun