Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

Standard Compounds


Compounds

class  CFactory
class  CFactoryData
class  CUnknown

Defines

#define hyp_DECLARE_EXPORTED_FUNCTIONS
#define hyp_DECLARE_IUNKNOWN

Detailed Description

Here are the standard compounds to create easily Hyperion Components.
Author(s):
Implementation inspired by Dale Rogerson - "Inside COM" - Microsoft Press - 1997.

Define Documentation

#define hyp_DECLARE_EXPORTED_FUNCTIONS
 

Value:

        hyp_EXPORT_DLL hyp_ker::com_result hyp_CALL_CONV hypDllCanUnloadNow(void) {      \
                return hyp_ker::CFactory::CanUnloadNow();                                    \
        }                                                                                \
        hyp_EXPORT_DLL hyp_ker::com_result hyp_CALL_CONV hypDllGetClassObject(const hyp_ker::hypCLSID& clsid,const hyp_ker::hypIID& iid,void** ppv) { \
                hypstd_TRACE( ("Appel de DllGetClassObject") );                              \
                return hyp_ker::CFactory::GetClassObject(clsid, iid, ppv);                   \
        }                                                                                \
        hyp_EXPORT_DLL hyp_ker::com_result hyp_CALL_CONV hypDllRegisterServer(void) {    \
                return hyp_ker::CFactory::RegisterAll();                                     \
        }                                                                                \
        hyp_EXPORT_DLL hyp_ker::com_result hyp_CALL_CONV hypDllUnregisterServer(void) {  \
                return hyp_ker::CFactory::UnregisterAll();                                   \
        }
Include this macro in a implementation files to define automatically the exported functions. Don't miss to define a .def file to export these functions.

#define hyp_DECLARE_IUNKNOWN
 

Value:

        virtual hyp::ker::com_result QueryInterface(const hyp::ker::hypIID & iid, void** ppv) {\
                return GetOuterUnknown()->QueryInterface(iid,ppv);                                 \
        }                                                                                      \
        virtual hyp::t_ulong AddRef() {                                                        \
                return GetOuterUnknown()->AddRef();                                                \
        }                                                                                      \
        virtual hyp::t_ulong Release() {                                                       \
                return GetOuterUnknown()->Release();                                               \
        }
Utility macro used to defined the functions of the IUnknown interface.


Top of Page
written by Pierre Rebours © 2000-2001. Terms of Use.