Back

// PSLSystem.h : Declaration of the CPSLSystem

#pragma once
#include "resource.h"       // main symbols
#include "GUIDs.h"
#include "ProSysLib_i.h"
#include "PSLExceptions.h"
#include "AutoObject.h"

#include "PSLHardware.h"
#include "PSLSoftware.h"
#include "PSLNetwork.h"
#include "PSLCurrentProcess.h"
#include "PSLSecurity.h"
#include "PSLTools.h"

#ifdef _WIN32_WCE
#error "Neutral-threaded COM objects are not supported on Windows CE."
#endif

class ATL_NO_VTABLE CPSLSystem :
   public CComObjectRootEx<CComMultiThreadModel>,
   public CComCoClass<CPSLSystem, &CLSID_PSLSystem>,
   public IDispatchImpl<IPSLSystem, &IID_IPSLSystem, &LIBID_ProSysLib, PSL_HiVersion, PSL_LoVersion>,
   public CPSLException<&CLSID_PSLSystem, &IID_IPSLSystem>
{
public:

   CPSLSystem();

DECLARE_REGISTRY_RESOURCEID(IDR_PSLSYSTEM)

BEGIN_COM_MAP(CPSLSystem)
   COM_INTERFACE_ENTRY(IPSLSystem)
   COM_INTERFACE_ENTRY(IDispatch)
   COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()

   DECLARE_PROTECT_FINAL_CONSTRUCT()
   HRESULT FinalConstruct();
   void FinalRelease();

////////////////////////////
// Interface Implementation:
////////////////////////////

   STDMETHOD(get_Hardware)(IPSLHardware ** ppValue);
   STDMETHOD(get_Software)(IPSLSoftware ** ppValue);
   STDMETHOD(get_Network)(IPSLNetwork ** ppValue);
   STDMETHOD(get_Process)(IPSLCurrentProcess ** ppValue);
   STDMETHOD(get_Security)(IPSLSecurity ** ppValue);
   STDMETHOD(get_Tools)(IPSLTools ** ppValue);
   STDMETHOD(DecodeException)(HRESULT ErrorCode, PSLException * pValue);

private:

   CAutoObject<CPSLHardware> m_Hardware;
   CAutoObject<CPSLSoftware> m_Software;
   CAutoObject<CPSLNetwork> m_Network;
   CAutoObject<CPSLCurrentProcess> m_Process;
   CAutoObject<CPSLSecurity> m_Security;
   CAutoObject<CPSLTools> m_Tools;
};

OBJECT_ENTRY_AUTO(__uuidof(PSLSystem), CPSLSystem)

Top