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.

77 lines
3.8 KiB

  1. // --------------------------------------------------------------------------------
  2. // Ixpras.h
  3. // Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  4. // Steven J. Bailey
  5. // --------------------------------------------------------------------------------
  6. #ifndef __IXPRAS_H
  7. #define __IXPRAS_H
  8. // --------------------------------------------------------------------------------
  9. // Dependencies
  10. // --------------------------------------------------------------------------------
  11. #include "imnxport.h"
  12. // --------------------------------------------------------------------------------
  13. // CRASTransport
  14. // --------------------------------------------------------------------------------
  15. class CRASTransport : public IRASTransport
  16. {
  17. private:
  18. ULONG m_cRef; // Reference counting
  19. CHAR m_szConnectoid[CCHMAX_CONNECTOID]; // Current connectoid
  20. HRASCONN m_hConn; // Handle to current RAS Connection
  21. BOOL m_fConnOwner; // We own the current RAS connection
  22. IRASCallback *m_pCallback; // RAS callback interface
  23. INETSERVER m_rServer; // Server Information
  24. RASDIALPARAMS m_rDialParams; // Dialing information
  25. UINT m_uRASMsg; // RAS Message
  26. HWND m_hwndRAS; // RAS callback window
  27. CRITICAL_SECTION m_cs; // Thread Safety
  28. private:
  29. BOOL FRasHangupAndWait(DWORD dwMaxWaitSeconds);
  30. BOOL FEnumerateConnections(LPRASCONN *pprgConn, ULONG *pcConn);
  31. BOOL FFindConnection(LPSTR pszConnectoid, LPHRASCONN phConn);
  32. HRESULT HrLogon(BOOL fForcePrompt);
  33. HRESULT HrStartRasDial(void);
  34. static INT_PTR CALLBACK RASConnectDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  35. public:
  36. // ----------------------------------------------------------------------------
  37. // Construction
  38. // ----------------------------------------------------------------------------
  39. CRASTransport(void);
  40. ~CRASTransport(void);
  41. // ----------------------------------------------------------------------------
  42. // IUnknown Methods
  43. // ----------------------------------------------------------------------------
  44. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  45. STDMETHODIMP_(ULONG) AddRef(void);
  46. STDMETHODIMP_(ULONG) Release(void);
  47. // ----------------------------------------------------------------------------
  48. // IInternetTransport methods
  49. // ----------------------------------------------------------------------------
  50. STDMETHODIMP Connect(LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging);
  51. STDMETHODIMP DropConnection(void);
  52. STDMETHODIMP Disconnect(void);
  53. STDMETHODIMP IsState(IXPISSTATE isstate);
  54. STDMETHODIMP GetServerInfo(LPINETSERVER pInetServer);
  55. STDMETHODIMP_(IXPTYPE) GetIXPType(void);
  56. STDMETHODIMP InetServerFromAccount(IImnAccount *pAccount, LPINETSERVER pInetServer);
  57. STDMETHODIMP HandsOffCallback(void);
  58. STDMETHODIMP GetStatus(IXPSTATUS *pCurrentStatus) {return E_NOTIMPL;};
  59. // ----------------------------------------------------------------------------
  60. // IRASTransport methods
  61. // ----------------------------------------------------------------------------
  62. STDMETHODIMP InitNew(IRASCallback *pCallback);
  63. STDMETHODIMP GetRasErrorString(UINT uRasErrorValue, LPSTR pszErrorString, ULONG cchMax, DWORD *pdwRASResult);
  64. STDMETHODIMP FillConnectoidCombo(HWND hwndComboBox, boolean fUpdateOnly, DWORD *pdwRASResult);
  65. STDMETHODIMP EditConnectoid(HWND hwndParent, LPSTR pszConnectoid, DWORD *pdwRASResult);
  66. STDMETHODIMP CreateConnectoid(HWND hwndParent, DWORD *pdwRASResult);
  67. STDMETHODIMP GetCurrentConnectoid(LPSTR pszConnectoid, ULONG cchMax);
  68. };
  69. #endif // __IXPRAS_H