RegisterTypeLibForUser function (oleauto.h)

Registers a type library for use by the calling user.

Syntax

HRESULT RegisterTypeLibForUser(
                 ITypeLib *ptlib,
  [in]           OLECHAR  *szFullPath,
  [in, optional] OLECHAR  *szHelpDir
);

Parameters

ptlib

The type library.

[in] szFullPath

The fully qualified path specification for the type library.

[in, optional] szHelpDir

The directory in which the Help file for the library being registered can be found. This parameter can be null.

Return value

This function can return one of these values.

Return code Description
S_OK
Success.
E_INVALIDARG
One or more of the arguments is not valid.
E_OUTOFMEMORY
Insufficient memory to complete the operation.
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

RegisterTypeLibForUser has functionality identical to RegisterTypeLib except that type library is registered for use only by the calling user identity.

Requirements

Requirement Value
Target Platform Windows
Header oleauto.h
Library OleAut32.lib
DLL OleAut32.dll