RegisterTypeLib

This function adds information about a type library to the system registry.

HRESULT RegisterTypeLib( 
ITypeLib FAR *ptlib, 
OLECHAR FAR *szFullPath, 
OLECHAR FAR *szHelpDir ); 

Parameters

  • ptlib
    Pointer to the type library being registered.
  • szFullPath
    Null-terminated string that contains the fully qualified path specification for the type library being registered.
  • szHelpDir
    Null-terminated string that contains the directory in which the Help file for the library being registered can be found. Can be NULL.

Return Values

One of the values obtained from the returned HRESULT and described in the following table is returned.

Value Description
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.

Remarks

Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.

The function RegisterTypeLib can be used during application initialization to register the application's type library correctly.

In addition to filling in a complete registry entry under the type library key, RegisterTypeLib adds entries for each of the dispinterfaces and Automation-compatible interfaces, including dual interfaces. This information is required to create instances of these interfaces. Coclasses are not registered (that is, RegisterTypeLib does not write any values to the CLSID key of the coclass).

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Oleauto.h   Oleaut32.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.