title | ms.custom | ms.date | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type Library Access | Microsoft Docs |
11/04/2016 |
|
article |
|
|
|
a03fa7f0-86c2-4119-bf81-202916fb74b3 |
14 |
mikeblome |
mblome |
ghogen |
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:
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). |
Declares the GetTypeLib
member function of your control class.
DECLARE_OLETYPELIB(class_name)
class_name
The name of the control class related to the type library.
Use this macro in the control class header file.
Header: afxdisp.h
Implements the control's GetTypeLib
member function.
IMPLEMENT_OLETYPELIB(class_name, tlid, wVerMajor, wVerMinor)
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.
This macro must appear in the implementation file for any control class that uses the DECLARE_OLETYPELIB
macro.
Header: afxdisp.h