Source code of Windows XP (NT5)
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.

93 lines
2.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: C O M M C O N N . H
  7. //
  8. // Contents: defines the INetConnectionCommonUi interface.
  9. //
  10. // Notes:
  11. //
  12. // Author: scottbri 14 Jan 1998
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #ifndef _COMMCONN_H_
  17. #define _COMMCONN_H_
  18. #include <netshell.h>
  19. #include "nsbase.h"
  20. #include "nsres.h"
  21. // typedef enum tagNETCON_CHOOSEFLAGS
  22. // {
  23. // NCCHF_CONNECT = 0x0001, // Selected Connection is activated
  24. // // and returned. If not set then
  25. // // the selected connection interface
  26. // // is returned without being activated
  27. // NCCHF_CAPTION = 0x0002,
  28. // NCCHF_OKBTTNTEXT = 0x0004,
  29. // } NETCON_CHOOSEFLAGS;
  30. //
  31. // typedef enum tagNETCON_CHOOSETYPE
  32. // {
  33. // NCCHT_DIRECT_CONNECT = 0x0001,
  34. // NCCHT_INBOUND = 0x0002,
  35. // NCCHT_CONNECTIONMGR = 0x0004,
  36. // NCCHT_LAN = 0x0008,
  37. // NCCHT_PHONE = 0x0010,
  38. // NCCHT_TUNNEL = 0x0020,
  39. // NCCHT_ALL = 0x003F
  40. // } NETCON_CHOOSETYPE;
  41. //
  42. // typedef struct tagNETCON_CHOOSECONN
  43. // {
  44. // DWORD lStructSize;
  45. // HWND hwndParent;
  46. // DWORD dwFlags; // Combine NCCHF_* flags
  47. // DWORD dwTypeMask; // Combine NCCHT_* flags
  48. // PCWSTR lpstrCaption;
  49. // PCWSTR lpstrOkBttnText;
  50. // } NETCON_CHOOSECONN;
  51. class ATL_NO_VTABLE CConnectionCommonUi :
  52. public CComObjectRootEx <CComObjectThreadModel>,
  53. public CComCoClass <CConnectionCommonUi, &CLSID_ConnectionCommonUi>,
  54. public INetConnectionCommonUi
  55. {
  56. public:
  57. DECLARE_REGISTRY_RESOURCEID(IDR_COMMCONN)
  58. BEGIN_COM_MAP(CConnectionCommonUi)
  59. COM_INTERFACE_ENTRY(INetConnectionCommonUi)
  60. END_COM_MAP()
  61. CConnectionCommonUi();
  62. ~CConnectionCommonUi();
  63. STDMETHODIMP ChooseConnection(
  64. NETCON_CHOOSECONN * pChooseConn,
  65. INetConnection** ppCon);
  66. STDMETHODIMP ShowConnectionProperties (
  67. HWND hwndParent,
  68. INetConnection* pCon);
  69. STDMETHODIMP StartNewConnectionWizard (
  70. HWND hwndParent,
  71. INetConnection** ppCon);
  72. INetConnectionManager * PConMan() {return m_pconMan;}
  73. HIMAGELIST HImageList() {return m_hIL;}
  74. private:
  75. HRESULT HrInitialize();
  76. private:
  77. INetConnectionManager * m_pconMan;
  78. HIMAGELIST m_hIL;
  79. };
  80. #endif