Szerkesztés

Megosztás a következőn keresztül:


Type Library Access

Type libraries expose the interfaces of an OLE control to other OLE-aware applications. Each OLE control must have a type library if one or more interfaces are to be exposed.

The following macros allow an OLE control to provide access to its own type library:

Type Library Access

Name Description
DECLARE_OLETYPELIB Declares a GetTypeLib member function of an OLE control (must be used in the class declaration).
IMPLEMENT_OLETYPELIB Implements a GetTypeLib member function of an OLE control (must be used in the class implementation).

DECLARE_OLETYPELIB

Declares the GetTypeLib member function of your control class.

DECLARE_OLETYPELIB(class_name)

Parameters

class_name
The name of the control class related to the type library.

Remarks

Use this macro in the control class header file.

Requirements

Header: afxdisp.h

IMPLEMENT_OLETYPELIB

Implements the control's GetTypeLib member function.

IMPLEMENT_OLETYPELIB(class_name, tlid, wVerMajor,  wVerMinor)

Parameters

class_name
The name of the control class related to the type library.

tlid
The ID number of the type library.

wVerMajor
The type library major version number.

wVerMinor
The type library minor version number.

Remarks

This macro must appear in the implementation file for any control class that uses the DECLARE_OLETYPELIB macro.

Requirements

Header: afxdisp.h

See also

Macros and Globals