AtlLoadTypeLib

This function is called to load a type library.

ATLINLINE ATLAPI AtlLoadTypeLib(
   HINSTANCE hInstTypeLib,
   LPCOLESTR lpszIndex,
   BSTR* pbstrPath,
   ITypeLib** ppTypeLib 
);

Parameters

  • hInstTypeLib
    Handle to the module associated with the type library.

  • lpszIndex
    String in the format "\\N", where N is the integer index of the type library resource. Can be NULL if no index is required.

  • pbstrPath
    On successful return, contains the full path of the module associated with the type library.

  • ppTypeLib
    On successful return, contains a pointer to a pointer to the loaded type library.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

This helper function is utilized by AtlRegisterTypeLib and AtlUnRegisterTypeLib.

Requirements

Header: atlbase.h

See Also

Concepts

Server Registration Global Functions

AtlUnRegisterTypeLib

AtlRegisterTypeLib