LoadTypeLibEx

HRESULT LoadTypeLibEx( 
  LPCOLESTR  szFile, 
  REGKIND  regkind,  
  ITYPELIB  pptlib   
);
 

Loads a type library and (optionally) registers it in the system registry.

Parameters

szFile
Specification for the type library file.
regkind
Identifies the kind of registration to perform for the type library (DEFAULT, REGISTER, or NONE).
pptlib
Reference to the type library being loaded.

Return Value

The return value obtained from the returned HRESULT is one of the following:

Return value Meaning
S_OK Success.
E_OUTOFMEMORY Out of memory.
E_INVALIDARG One or more of the arguments is invalid.
TYPE_E_IOERROR The function could not write to the file.
TYPE_E_REGISTRYACCESS The system registration database could not be opened.
TYPE_E_INVALIDSTATE The type library could not be opened.

Comments

Enables programmers to specify whether or not the type library should be loaded.

Example

typedef enum tagREGKIND
{
    REGKIND_DEFAULT,
    REGKIND_REGISTER,
    REGKIND_NONE
} REGKIND;