Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

99 lines
3.0 KiB

/////////////////////////////////////////////////////////////////////////////
// FILE : FaxServer.h //
// //
// DESCRIPTION : Header file for CFaxServer that contains the //
// Connect / Disconnect functionality to the Fax Server //
// //
// //
// AUTHOR : yossg //
// //
// HISTORY : //
// Nov 25 1999 yossg Init . //
// Aug 3 2000 yossg Add notification window //
// //
// Copyright (C) 1999 - 2000 Microsoft Corporation All Rights Reserved //
/////////////////////////////////////////////////////////////////////////////
#ifndef H_MMCFAXSERVER_H
#define H_MMCFAXSERVER_H
class CFaxDevicesNode;
class CFaxGeneralNotifyWnd;
class CFaxServer
{
public:
//
// Constructor
//
CFaxServer (LPTSTR lptstrServerName):
m_hFaxHandle(NULL),
m_bstrServerName(lptstrServerName),
m_pDevicesNode(NULL),
m_pNotifyWin(NULL),
m_hDevicesStatusNotification(NULL),
m_dwServerAPIVersion(CURRENT_FAX_API_VERSION),
m_bDesktopSKUConnection(FALSE)
{}
//
// Destructor
//
~CFaxServer ()
{
Disconnect();
DestroyNotifyWindow();
}
HANDLE GetFaxServerHandle();
HRESULT Disconnect();
STDMETHOD (SetServerName)(BSTR bstrServerName);
const CComBSTR& GetServerName();
BOOL IsServerRunningFaxService ();
BOOL IsServerFaxServiceStopped ();
HRESULT RegisterForDeviceNotifications(CFaxDevicesNode * pDevices);
HRESULT OnNewEvent(PFAX_EVENT_EX pFaxEvent);
DWORD GetServerAPIVersion() { return m_dwServerAPIVersion; }
BOOL IsDesktopSKUConnection() {return m_bDesktopSKUConnection; }
private:
HRESULT Connect();
HRESULT InternalRegisterForDeviceNotifications();
DWORD CreateNotifyWindow();
DWORD RegisterForNotifications();
HRESULT UnRegisterForNotifications();
VOID DestroyNotifyWindow();
//
// members
//
HANDLE m_hFaxHandle;
CComBSTR m_bstrServerName;
CFaxDevicesNode * m_pDevicesNode;
CFaxGeneralNotifyWnd* m_pNotifyWin;
//
// Notification registration handle
//
HANDLE m_hDevicesStatusNotification;
//
// Server API Version info
//
DWORD m_dwServerAPIVersion;
BOOL m_bDesktopSKUConnection;
};
#endif //H_MMCFAXSERVER_H