Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6compif.h
Go to the documentation of this file.
1 
12 #ifndef P6COMPIF_H__
13 #define P6COMPIF_H__ 1
14 
15 #include "p6dllapi.h"
16 
17 
18 #ifdef __cplusplus
19 namespace P6R {
20 extern "C" {
21 #endif
22 
27 
36  typedef struct
37  {
38  const P6CATID *m_pCATID;
41 
50  typedef P6ERR (*P6CREATEINST)(p6ICom *pOuter,const P6REFIID iid,P6VOID **ppNewComponent);
51 
62  typedef struct
63  {
64  const P6CID *m_pCID;
70 
71  typedef P6ERR (*P6DLLSTART)();
72  typedef P6ERR (*P6DLLEND)();
73 
74  typedef P6VOID (*CIDCB)(const P6REFCID cid,P6VOID *pCtx);
80  #undef INTERFACE
81  #define INTERFACE p6IRegistrar
83  {
85 
86  P6DECLCOMMETHOD(registerComponent)(P6THIS_ const P6REFCID cid,const P6WCHAR *pszName,const P6WCHAR *pszPathname) P6PURE;
87  P6DECLCOMMETHOD(unregisterComponent)(P6THIS_ const P6REFCID cid) P6PURE;
88  P6DECLCOMMETHOD(registerAll)(P6THIS) P6PURE;
89  P6DECLCOMMETHOD(unregisterAll)(P6THIS) P6PURE;
90  P6DECLCOMMETHOD(enumCIDs)(P6THIS_ CIDCB pfnCB,P6VOID *pCBCtx) P6PURE;
91  };
92  #define IF_p6IRegistrar {0x6BBCC514,0xF8BA,0x40b9,{0x9C,0x52,0x32,0x9D,0xBE,0x3F,0x5D,0x9E}}
93 
110  #undef INTERFACE
111  #define INTERFACE p6IEnumComponents
113  {
115 
133  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements,P6COMPONENTDATA *parElements,P6UINT32 *pcReturned) P6PURE;
134 
143  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
144  };
145  /*{C2B56A58-4B7C-E1F9-C84E-4794FA242DC1}*/
146  #define IF_p6IEnumComponents {0xC2B56A58,0x4B7C,0xE1F9,{0xC8,0x4E,0x47,0x94,0xFA,0x24,0x2D,0xC1}}
147 
148 
149 
163  #undef INTERFACE
164  #define INTERFACE p6IModule
166  {
168 
189  P6DECLCOMMETHOD(initialize)(P6THIS_ const P6DLLAPI *pDllApi,const P6WCHAR *pwszFilename) P6PURE;
190 
201  P6DECLCOMMETHOD(start)(P6THIS) P6PURE;
202 
214 
220  P6DECLCOMMETHOD(getModuleInfo)(P6THIS) P6PURE;
221 
241  P6DECLCOMMETHOD(getComponentFactory)(P6THIS_ const P6REFCID cid,const P6REFIID iid,P6VOID **ppIface) P6PURE;
242 
255  P6DECLCOMMETHOD(canUnloadNow)(P6THIS) P6PURE;
256 
270  P6DECLCOMMETHOD(selfRegister)(P6THIS_ p6IRegistrar *pRegistrar) P6PURE;
271 
272 
281  P6DECLCOMMETHOD(selfUnregister)(P6THIS_ p6IRegistrar *pRegistrar) P6PURE;
282 
298  P6DECLCOMMETHOD(getVersion)(P6THIS_ VERFIELDS nField,P6VERSION *pVersion) P6PURE;
299 
316  P6DECLCOMMETHOD(getVersionLocale)(P6THIS_ P6CHAR *pBuffer,P6SIZE cBuffer) P6PURE;
317 
344  P6DECLCOMMETHOD(getVersionString)(P6THIS_ VERSTRFIELDS nField,P6WCHAR *pBuffer,P6SIZE *pcBuffer) P6PURE;
345 
359  P6DECLCOMMETHOD(enumComponents)(P6THIS_ p6IEnumComponents **ppEnum) P6PURE;
360  };
361  #define IF_p6IModule {0xB4573CD0,0x764C,0x458e,{0xAE,0x09,0x9C,0x5D,0x75,0xC5,0x26,0x0F}}
362 
375  #undef INTERFACE
376  #define INTERFACE p6IFactory
378  {
380 
381  P6DECLCOMMETHOD(createInstance)(P6THIS_ p6ICom *pOuter,const P6REFIID iid,P6VOID **ppIface) P6PURE;
382  P6DECLCOMMETHOD(lockServer)(P6THIS_ P6BOOL bLock) P6PURE;
383  };
384  // {00000001-0000-0000-C000-000000000046}
385  #define IF_p6IFactory {0x00000001,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}}
386 
387 P6ERR P6CCALL p6GlueGetIModule(const P6COMPONENTDATA *pCompDataArray,
388  const P6INT32 cCompDataArray,
389  P6INT32 *pcActiveComponents,
390  p6IModule **ppModule,
391  const P6VERINFO *pVerinfo,
392  P6DLLSTART pfnStart,
393  P6DLLSTART pfnEnd);
394 
395 #ifdef __cplusplus
396 } // extern "C"
397 } //namespace
398 #endif
399 
400 #endif
size_t P6SIZE
Definition: p6types.h:90
#define P6CCALL
Definition: p6defs.h:124
const P6CID * m_pCID
The component ID.
Definition: p6compif.h:64
#define P6REFIID
Definition: p6defs.h:197
uint32_t P6UINT32
Definition: p6types.h:77
#define P6DECLAREICOM
Definition: p6defs.h:191
P6UINT32 m_cCatEntCount
The number of valid category entries in the m_parCategories array.
Definition: p6compif.h:68
P6ERR(* P6CREATEINST)(p6ICom *pOuter, const P6R::P6IID &iid, P6VOID **ppNewComponent)
Defines the static createInstance() method that a component must implement (usually using the P6_DECL...
Definition: p6compif.h:50
#define P6PURE
Definition: p6defs.h:192
P6VOID(* CIDCB)(const P6R::P6CID &cid, P6VOID *pCtx)
Definition: p6compif.h:74
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
Component factory used to create instances of components.
Definition: p6compif.h:377
Provides services to register a component with [p6]COM at runtime.
Definition: p6compif.h:82
P6ERR P6CCALL p6GlueGetIModule(const P6COMPONENTDATA *pCompDataArray, const P6INT32 cCompDataArray, P6INT32 *pcActiveComponents, p6IModule **ppModule, const P6VERINFO *pVerinfo, P6DLLSTART pfnStart, P6DLLSTART pfnEnd)
const P6WCHAR * m_pszComponentName
Freindly name of component.
Definition: p6compif.h:66
const P6WCHAR * m_pCategoryName
Definition: p6compif.h:39
const P6CATEGORYDATA * m_parCategories
NULL terminated array of categories that this component wants to register under.
Definition: p6compif.h:67
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
P6ERR(* P6DLLSTART)()
Definition: p6compif.h:71
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
const P6CATID * m_pCATID
Definition: p6compif.h:38
P6COM DLL runtime api definitions.
A universally unique indentifier (UUID).
Definition: p6types.h:162
P6CREATEINST m_pfnCreateInstance
Method used by the component factory to create an uninitialize instance of it.
Definition: p6compif.h:65
P6UINT32 P6ERR
COM err return type see P6ERR.h.
Definition: p6types.h:141
Enumerates the components in the current module (DLL).
Definition: p6compif.h:112
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6ERR(* P6DLLEND)()
Definition: p6compif.h:72
Component module interface used to interface with the COM runtime.
Definition: p6compif.h:165
#define P6THIS_
Definition: p6defs.h:193
#define P6REFCID
Definition: p6defs.h:196
void P6VOID
Definition: p6types.h:109
int32_t P6INT32
Definition: p6types.h:76
#define P6THIS
Definition: p6defs.h:194
An array of these is used to define categories that a component is a member of.
Definition: p6compif.h:36
char P6CHAR
Narrow character type.
Definition: p6types.h:105
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188
Manages component data for the [p6]COM component glue.
Definition: p6compif.h:62