Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LoadRegTypeLib

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function uses registry information to load a type library.


HRESULT LoadRegTypeLib( 
  REFGUID rguid, 
  unsigned short wVerMajor, 
  unsigned short wVerMinor, 
  LCID lcid, 
  ITypeLib FAR* FAR* pptlib 
); 

rguid

[in] Globally unique identifier (GUID) of the library being loaded.

wVerMajor

[in] Major version number of the library being loaded.

wVerMinor

[in] Minor version number of the library being loaded.

lcid

[in] National language code of the library being loaded.

pptlib

[out] On return, pointer to a pointer to the loaded type library.

Returns the HRESULT values shown in the following table.

Value Description

S_OK

Success.

E_OUTOFMEMORY

Out of memory.

E_INVALIDARG

One or more arguments is invalid.

TYPE_E_IOERROR

The function could not read from the file.

TYPE_E_INVALIDSTATE

The type library could not be opened.

TYPE_E_INVDATAREAD

The function could not read from the file.

TYPE_E_UNSUPFORMAT

The type library has an older format.

TYPE_E_UNKNOWNLCID

The passed in LCID could not be found in the OLE-supported DLLs.

TYPE_E_CANTLOADLIBRARY

The type library or DLL could not be loaded.

Other return codes

FACILITY_STORAGE and system registry errors can be returned.

Only typelib2 type libraries are supported.

The function LoadRegTypeLib defers to LoadTypeLib to load the file.

LoadRegTypeLib compares the requested version numbers against those found in the system registry, and takes one of the following actions:

  • If a registered library exactly matches the requested major and minor version numbers, that type library is loaded.
  • If one or more registered type libraries exactly match the requested major version number, and has a greater minor version number than that requested, the one with the greatest minor version number is loaded.
  • If no registered type library exactly matches the requested major version number (or if none of those that exactly match the major version number have a minor version number greater than or equal to the requested minor version number), LoadRegTypeLib returns an error.

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Headeroleauto.h
Libraryoleaut32.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft