Files
Work/com/hold/com.hpp
2024-08-07 09:12:07 -04:00

47 lines
1.2 KiB
C++

#ifndef _COM_COM_HPP_
#define _COM_COM_HPP_
#define COMMON_ENABLE_COM
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_SMARTPOINTER_HPP_
#include <common/pointer.hpp>
#endif
#ifndef _COM_OBJBASE_HPP_
#include <com/objbase.hpp>
#endif
#ifndef _COM_OLE2_HPP_
#include <com/ole2.hpp>
#endif
#ifndef _COM_SERVERINFO_HPP_
#include <com/srvinfo.hpp>
#endif
#ifndef _COM_RESULT_HPP_
#include <com/result.hpp>
#endif
#ifndef _COM_CLASSCONTEXT_HPP_
#include <com/clsctx.hpp>
#endif
#ifndef _COM_MULTIQUERY_HPP_
#include <com/multiqi.hpp>
#endif
#ifndef _COM_COMINIT_HPP_
#include <com/cominit.hpp>
#endif
class ComObj
{
public:
ComObj(void);
virtual ~ComObj();
ComResult createInstance(REFCLSID rclsId,REFIID riid,SmartPointer<IUnknown> &ppInterface,ClassContext classContext,SmartPointer<IUnknown> &pUnkOuter);
ComResult createInstance(REFCLSID rclsId,REFIID riid,SmartPointer<IUnknown> &ppInterface,ClassContext classContext=InprocServer);
ComResult createInstance(REFCLSID rclsid,IUnknown *pUnkOuter,ClassContext classContext,ServerInfo &serverInfo,MultiQuery &multiQuery);
private:
ComObj(const ComObj &comObj);
ComObj &operator=(const ComObj &comObj);
ComInitializer mComInitializer;
};
#endif