IProvideDynamicClassInfoImpl

template <class T, const CLSID *pCoclsid, const GUID *pSrcid, const GUID *pLibid, BOOL bGetStaticRuntimeTypeInfo = FALSE, WORD wMajor = 1, WORD wMinor = 0>

class ATL_NO_VTABLE IProvideDynamicClassInfoImpl : public IProvideDynamicClassInfo

Parameters

T

Your derived class.

pCoclsid

Pointer to the class ID of the run-time object.

pSrcid

Pointer to the GUID of the default event interface.

pLibid

Pointer to the GUID of the object's type library.

bGetStaticRuntimeTypeInfo

FALSE if the object supports dynamic type information at run time. Set to TRUE if you aren't implementing dynamic type information, but are using a separate run-time object. Default is FALSE.

wMajor

Major version number of the type library.

wMinor

Minor version number of the type library.

Note   The first 3 parameters are required for all instantiations of IProvideDynamicClassInfoImpl.

IProvideDynamicClassInfoImpl provides access to default type information and generates the ITypeInfo object for a specific class. Use this class and the helper classes CFuncDesc, CVarDesc, and CElemDesc to build properties and methods and add them to the run-time type information object.

IProvideDynamicClassInfoImpl provides the default implementation of the IProvideDynamicClassInfo interface.

Using the type information extension methods, you can easily add and remove methods and properties to the default and event interfaces of the run-time object. Of course, you have to implement those properties and methods in the run-time object. Note, however, that the SDK framework generates type information for dispinterfaces, so you must implement properties and methods through IDispatch::Invoke.

#include <addyn.h>

Class Members

Method Description
AddMethod (_IINTERFACETYPE iInterface, CFuncDesc *pFuncDesc) Adds a method to either the default or event interface, as specified in iInterface. The pFuncDesc parameter contains the information required to add the method to the specified interface.
AddProperty (CVarDesc *pVarDesc) Add a property to the default interface. The pVarDesc parameter contains the information required to add the property to the default interface.
LPTSTR GetCoclassName (void) Returns the name of the coclass.
LPTSTR GetDefInterfaceName (void) Returns the name of the default interface.
GetDynamicClassInfo (ITypeInfo **ppTI, DWORD *pdwCookie) Returns a pointer to the dynamic type information for the current object.
GetSourceLib (ITypeLib **ppITypeLib) Returns a pointer to the source type library used to build the dynamic type information object.
LPTSTR GetSrcInterfaceName (void) Returns the name of the source interface.
FreezeShape (void) Freezes the type information object.
IProvideDynamicClassInfoImpl Constructor.
RemoveMethod (_IINTERFACETYPE iInterface, MEMBERID iMethodID) Removes a method from the specified interface.
RemoveProperty (MEMBERID iPropertyID) Removes a default property from the default interface.
BOOL SetCoclassName (LPTSTR pszCoclass) Sets the name of the coclass. Must be set at designer start-up.
BOOL SetDefInterfaceName (LPSTR pszDefInterface) Sets the name of the default interface. Must be set at designer start-up.
SetSrcInterfaceName (LPSTR pszSrcInterface) Sets the name of the source interface. Must be set at designer start-up.

See Also

CFuncDesc, CVarDesc, CElemDesc,Supporting Dynamic Type Information, IProvideDynamicClassInfo