- computerinfo_demo.zip
- ComputerInformation
- Bin
- Debug
- Inc
- Lib
- md
- Regsiter.bat
- SocketUtil
- SystemApplication
- SystemCPU
- SystemDevices
- SystemHDisk
- SystemInfo
- SystemKeyboard
- SystemLocale
- SystemMemory
- SystemMisc
- SystemModem
- SystemMouse
- SystemMultiMedia
- SystemNetwork
- SystemOS
- SystemPnPDevices
- SystemProtectFiles
- SystemStorage
- TestConsole
- UnRegister.bat
|
// PnPDevicesInfo.h : Declaration of the CPnPDevicesInfo
#ifndef __PNPDEVICESINFO_H_
#define __PNPDEVICESINFO_H_
#include "resource.h" // main symbols
#include <list>
#include <atlbase.h>
#include "SetupApi.h"
/////////////////////////////////////////////////////////////////////////////
// CPnPDevicesInfo
class ATL_NO_VTABLE CPnPDevicesInfo :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CPnPDevicesInfo, &CLSID_PnPDevicesInfo>,
public ISupportErrorInfo,
public IDispatchImpl<IPnPDevicesInfo, &IID_IPnPDevicesInfo, &LIBID_SYSTEMPNPDEVICESLib>
{
public:
CPnPDevicesInfo()
: m_bInfoInitialized(false)
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_PNPDEVICESINFO)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CPnPDevicesInfo)
COM_INTERFACE_ENTRY(IPnPDevicesInfo)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()
HRESULT FinalConstruct()
{
m_pDevices = NULL;
return S_OK;
}
void FinalRelease()
{
if (NULL != m_pDevices)
{
m_pDevices->Release ();
}
m_pDevices = NULL;
}
// ISupportsErrorInfo
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
// IPnPDevicesInfo
public:
STDMETHODIMP GetPnpDevices(IPnPDevices** pDevices);
protected:
HRESULT InitInfo(void);
bool m_bInfoInitialized;
IUnknown *m_pDevices;
private:
HRESULT GetDeviceRegistryInfo (IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData,
IN DWORD Property,
OUT std::string &strInfo);
HRESULT GetDeviceDriverInfo (IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData,
IN IPnPDeviceDrivers *pDrivers);
friend class CPnPDevice;
friend class CPnPDeviceDriver;
};
#endif //__PNPDEVICESINFO_H_
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.