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.

97 lines
2.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: I N B U I . H
  7. //
  8. // Contents: Inbound connection UI object.
  9. //
  10. // Notes:
  11. //
  12. // Author: shaunco 15 Nov 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include <netshell.h>
  17. #include "nsbase.h"
  18. #include "nsres.h"
  19. class ATL_NO_VTABLE CInboundConnectionUi :
  20. public CComObjectRootEx <CComObjectThreadModel>,
  21. public CComCoClass <CInboundConnectionUi,
  22. &CLSID_InboundConnectionUi>,
  23. public INetConnectionPropertyUi2,
  24. public INetConnectionWizardUi
  25. {
  26. private:
  27. // This is our connection given to us via the SetConnection method.
  28. //
  29. INetConnection* m_pCon;
  30. // This is the server connection handle obtained by QI'ing m_pCon
  31. // for INetInboundConnection and calling the GetServerConnection method.
  32. // We do this as a way of verifying the INetConnection we are handed,
  33. // and to avoid the multiple RPCs calls we'd incur if we didn't cache it.
  34. //
  35. HRASSRVCONN m_hRasSrvConn;
  36. // This member is the context that we provide so that rasdlg.dll knows
  37. // which modifications to commit.
  38. //
  39. PVOID m_pvContext;
  40. // This member identifies our type to rasdlg.dll
  41. //
  42. DWORD m_dwRasWizType;
  43. public:
  44. CInboundConnectionUi ();
  45. ~CInboundConnectionUi ();
  46. DECLARE_REGISTRY_RESOURCEID(IDR_INBOUND_UI)
  47. BEGIN_COM_MAP(CInboundConnectionUi)
  48. COM_INTERFACE_ENTRY(INetConnectionPropertyUi2)
  49. COM_INTERFACE_ENTRY(INetConnectionWizardUi)
  50. END_COM_MAP()
  51. // INetConnectionPropertyUi2
  52. STDMETHOD (SetConnection) (
  53. INetConnection* pCon);
  54. STDMETHOD (AddPages) (
  55. HWND hwndParent,
  56. LPFNADDPROPSHEETPAGE pfnAddPage,
  57. LPARAM lParam);
  58. STDMETHOD (GetIcon) (
  59. DWORD dwSize,
  60. HICON *phIcon );
  61. // INetConnectionWizardUi
  62. STDMETHOD (QueryMaxPageCount) (
  63. INetConnectionWizardUiContext* pContext,
  64. DWORD* pcMaxPages);
  65. STDMETHOD (AddPages) (
  66. INetConnectionWizardUiContext* pContext,
  67. LPFNADDPROPSHEETPAGE pfnAddPage,
  68. LPARAM lParam);
  69. STDMETHOD (GetNewConnectionInfo) (
  70. DWORD* pdwFlags,
  71. NETCON_MEDIATYPE* pMediaType);
  72. STDMETHOD (GetSuggestedConnectionName) (
  73. PWSTR* ppszwSuggestedName);
  74. STDMETHOD (SetConnectionName) (
  75. PCWSTR pszwConnectionName);
  76. STDMETHOD (GetNewConnection) (
  77. INetConnection** ppCon);
  78. };