Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function looks up a class identifier in the registry, given a programmatic identifier.

Syntax

HRESULT CLSIDFromProgID(
  LPCOLESTR 
lpszProgID, 
  LPCLSID 
pclsid
);

Parameters

lpszProgID

[in] Long pointer to the ProgID whose class identifier is requested.

pclsid

[out] Pointer to the retrieved class identifier on return.

Return Value

One of the values described in the following table is returned.

Value Description

S_OK

The class identifier was retrieved successfully.

CO_E_CLASSSTRING

The registered class identifier for the ProgID is invalid.

REGDB_E_WRITEREGDB

An error occurred writing the class identifier to the registry.

REGDB_E_CLASSNOTREG

The class identifier for the ProgID cannot be found in the registry.

Remarks

Given a ProgID, CLSIDFromProgIDlooks up its associated class identifier in the registry.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

Header objbase.h
Library ole32.lib
Windows Embedded CE Windows CE 2.10 and later
Windows Mobile Windows Mobile Version 5.0 and later