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.

892 lines
25 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. // File: netconp.idl
  7. //
  8. // Private connections interfaces.
  9. //
  10. //----------------------------------------------------------------------------
  11. cpp_quote("//+-------------------------------------------------------------------------")
  12. cpp_quote("//")
  13. cpp_quote("// Microsoft Windows")
  14. cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
  15. cpp_quote("//")
  16. cpp_quote("//--------------------------------------------------------------------------")
  17. cpp_quote("#if ( _MSC_VER >= 800 )")
  18. cpp_quote("#pragma warning(disable:4201)")
  19. cpp_quote("#endif")
  20. #ifndef DO_NO_IMPORTS
  21. import "objidl.idl";
  22. import "netcon.idl";
  23. import "netcfgx.idl";
  24. import "netcfgp.idl";
  25. #endif
  26. import "upnp.idl";
  27. cpp_quote("")
  28. cpp_quote("EXTERN_C const CLSID CLSID_NetConnectionUiUtilities;")
  29. cpp_quote("EXTERN_C const CLSID CLSID_NetConnectionHNetUtil;")
  30. cpp_quote("EXTERN_C const CLSID GUID_NETSHELL_PROPS;")
  31. cpp_quote("EXTERN_C const CLSID CLSID_ConnectionManager2;")
  32. cpp_quote("")
  33. // Reserved GUIDS for our use
  34. //
  35. // FAEDCF50-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionUiLock
  36. // FAEDCF51-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionWizardUi
  37. // FAEDCF52-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionWizardUiContext
  38. // FAEDCF53-31FE-11D1-AAD2-00805FC1270E IID_INetInboundConnection
  39. // FAEDCF54-31FE-11D1-AAD2-00805FC1270E IID_INetLanConnection
  40. // FAEDCF55-31FE-11D1-AAD2-00805FC1270E IID_INetSharedAccessConnection
  41. // FAEDCF56-31FE-11D1-AAD2-00805FC1270E IID_INetLanConnectionWizardUi
  42. // FAEDCF57-31FE-11D1-AAD2-00805FC1270E IID_INetRasConnection
  43. // FAEDCF58-31FE-11D1-AAD2-00805FC1270E IID_INetRasConnectionIpUiInfo
  44. // FAEDCF59-31FE-11D1-AAD2-00805FC1270E IID_IPersistNetConnection
  45. // FAEDCF5A-31FE-11D1-AAD2-00805FC1270E
  46. // FAEDCF5B-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionBrandingInfo
  47. // FAEDCF5C-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionNotifySink
  48. // FAEDCF5D-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionManagerDebug
  49. // FAEDCF5E-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionUiUtilities
  50. // FAEDCF5F-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionRefresh
  51. // FAEDCF60-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionCMUtil
  52. // FAEDCF61-31FE-11D1-AAD2-00805FC1270E
  53. // FAEDCF62-31FE-11D1-AAD2-00805FC1270E
  54. // FAEDCF63-31FE-11D1-AAD2-00805FC1270E
  55. // FAEDCF64-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionHNetUtil
  56. // FAEDCF65-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionSysTray
  57. // FAEDCF66-31FE-11D1-AAD2-00805FC1270E IID_INetDefaultConnection
  58. // FAEDCF67-31FE-11D1-AAD2-00805FC1270E IID_ISharedAccessBeaconFinder
  59. // FAEDCF68-31FE-11D1-AAD2-00805FC1270E IID_INetMachinePolicies
  60. // FAEDCF69-31FE-11D1-AAD2-00805FC1270E IID_INetConnectionManager2
  61. // FAEDCF6A-31FE-11D1-AAD2-00805FC1270E IID_INetConnection2
  62. // FAEDCF6B-31FE-11D1-AAD2-00805FC1270E IID_ISharedAccessBeacon
  63. // FAEDCF6C-31FE-11D1-AAD2-00805FC1270E
  64. // ...
  65. // FAEDCFA3-31FE-11D1-AAD2-00805FC1270E
  66. // FAEDCFA4-31FE-11D1-AAD2-00805FC1270E
  67. // FAEDCFA5-31FE-11D1-AAD2-00805FC1270E
  68. interface INetConnectionUiLock;
  69. interface INetConnectionWizardUi;
  70. interface INetConnectionWizardUiContext;
  71. interface INetInboundConnection;
  72. interface INetLanConnection;
  73. interface INetSharedAccessConnection;
  74. interface INetLanConnectionWizardUi;
  75. interface INetRasConnection;
  76. interface INetRasConnectionIpUiInfo;
  77. interface IPersistNetConnection;
  78. interface INetConnectionBrandingInfo;
  79. interface INetConnectionNotifySink;
  80. interface INetConnectionUiUtilities;
  81. interface INetConnectionRefresh;
  82. interface INetConnectionCMUtil;
  83. interface INetConnectionHNetUtil;
  84. interface INetConnectionSysTray;
  85. interface INetDefaultConnection;
  86. interface ISharedAccessBeaconFinder;
  87. interface INetMachinePolicies;
  88. interface INetConnectionManager2;
  89. interface INetConnection2;
  90. //#if DBG
  91. interface INetConnectionManagerDebug;
  92. //#endif
  93. //+---------------------------------------------------------------------------
  94. // INetConnectionUiLock -
  95. //
  96. [
  97. local,
  98. object,
  99. uuid(FAEDCF50-31FE-11D1-AAD2-00805FC1270E),
  100. pointer_default(unique)
  101. ]
  102. interface INetConnectionUiLock : IUnknown
  103. {
  104. HRESULT QueryLock (
  105. [out, string] LPWSTR* ppszwLockHolder);
  106. };
  107. //+---------------------------------------------------------------------------
  108. // INetConnectionWizardUi -
  109. //
  110. [
  111. local,
  112. object,
  113. uuid(FAEDCF51-31FE-11D1-AAD2-00805FC1270E),
  114. pointer_default(unique)
  115. ]
  116. interface INetConnectionWizardUi : IUnknown
  117. {
  118. HRESULT QueryMaxPageCount (
  119. [in] INetConnectionWizardUiContext* pContext,
  120. [out] DWORD* pcMaxPages);
  121. HRESULT AddPages (
  122. [in] INetConnectionWizardUiContext* pContext,
  123. [in] LPFNADDPROPSHEETPAGE pfnAddPage,
  124. [in] LPARAM lParam);
  125. typedef enum tagNETCON_WIZARD_FLAGS
  126. {
  127. NCWF_RENAME_DISABLE = 0x0001,
  128. NCWF_SHORTCUT_ENABLE = 0x0002,
  129. NCWF_ALLUSER_CONNECTION= 0x0004,
  130. NCWF_GLOBAL_CREDENTIALS= 0x0008,
  131. NCWF_FIREWALLED = 0x0010,
  132. NCWF_DEFAULT = 0x0020,
  133. NCWF_SHARED = 0x0040,
  134. NCWF_INCOMINGCONNECTION= 0x0080,
  135. } NETCON_WIZARD_FLAGS;
  136. HRESULT GetNewConnectionInfo(
  137. [out] DWORD* pdwFlags,
  138. [out] NETCON_MEDIATYPE* pMediaType);
  139. HRESULT GetSuggestedConnectionName (
  140. [out, string] LPWSTR* pszwSuggestedName);
  141. HRESULT SetConnectionName (
  142. [in, string] LPCWSTR pszwConnectionName);
  143. HRESULT GetNewConnection(
  144. [out] INetConnection** ppCon);
  145. };
  146. //+---------------------------------------------------------------------------
  147. // INetConnectionWizardUiContext -
  148. //
  149. [
  150. local,
  151. object,
  152. uuid(FAEDCF52-31FE-11D1-AAD2-00805FC1270E),
  153. pointer_default(unique)
  154. ]
  155. interface INetConnectionWizardUiContext : IUnknown
  156. {
  157. typedef enum tagSETUP_MODE_FLAGS
  158. {
  159. NCWUC_SETUPMODE_MINIMAL = 0x0,
  160. NCWUC_SETUPMODE_TYPICAL = 0x1,
  161. NCWUC_SETUPMODE_LAPTOP = 0x2,
  162. NCWUC_SETUPMODE_CUSTOM = 0x3,
  163. } SETUP_MODE_FLAGS;
  164. typedef enum tagUNATTENDED_MODE_FLAGS
  165. {
  166. UM_DEFAULTHIDE = 0x1,
  167. UM_GUIATTENDED = 0x2,
  168. UM_PROVIDEDEFAULT = 0x3,
  169. UM_READONLY = 0x4,
  170. UM_FULLUNATTENDED = 0x5
  171. } UM_MODE;
  172. typedef enum tagPRODUCT_TYPE_FLAGS
  173. {
  174. NCWUC_PRODUCT_WORKSTATION = 0x0,
  175. NCWUC_PRODUCT_SERVER_DC = 0x1,
  176. NCWUC_PRODUCT_SERVER_STANDALONE = 0x2,
  177. } PRODUCT_TYPE_FLAGS;
  178. typedef enum tagOPERATION_FLAGS
  179. {
  180. NCWUC_SETUPOPER_UPGRADE = 0x4,
  181. NCWUC_SETUPOPER_UNATTENDED = 0x8,
  182. NCWUC_SETUPOPER_POSTINSTALL = 0x10,
  183. } OPERATION_FLAGS;
  184. DWORD GetSetupMode();
  185. DWORD GetProductType();
  186. DWORD GetOperationFlags();
  187. DWORD GetUnattendedModeFlags();
  188. HRESULT GetINetCfg(
  189. [out] INetCfg ** ppINetCfg);
  190. };
  191. //+---------------------------------------------------------------------------
  192. // INetInboundConnection -
  193. //
  194. [
  195. object,
  196. uuid(FAEDCF53-31FE-11D1-AAD2-00805FC1270E),
  197. pointer_default(unique)
  198. ]
  199. interface INetInboundConnection : IUnknown
  200. {
  201. HRESULT GetServerConnectionHandle (
  202. [out] ULONG_PTR* phRasSrvCon);
  203. HRESULT InitializeAsConfigConnection (
  204. [in] BOOL fStartRemoteAccess);
  205. };
  206. //+---------------------------------------------------------------------------
  207. // INetLanConnection -
  208. //
  209. [
  210. object,
  211. uuid(FAEDCF54-31FE-11D1-AAD2-00805FC1270E),
  212. pointer_default(unique)
  213. ]
  214. interface INetLanConnection : IUnknown
  215. {
  216. typedef enum tagLANCON_INFO_FLAGS
  217. {
  218. LCIF_NAME = 0x1,
  219. LCIF_ICON = 0x2,
  220. LCIF_COMP = 0x8,
  221. LCIF_ALL = 0xFF,
  222. } LANCON_INFO_FLAGS;
  223. typedef struct tagLANCON_INFO
  224. {
  225. [string] LPWSTR szwConnName;
  226. BOOL fShowIcon;
  227. GUID guid;
  228. } LANCON_INFO;
  229. HRESULT GetInfo (
  230. [in] DWORD dwMask,
  231. [out] LANCON_INFO* pLanConInfo);
  232. HRESULT SetInfo (
  233. [in] DWORD dwMask,
  234. [in] const LANCON_INFO* pLanConInfo);
  235. HRESULT GetDeviceGuid (
  236. [out, ref] GUID* pguid);
  237. };
  238. // Export functions and protptype typedefs
  239. //
  240. cpp_quote("")
  241. cpp_quote("EXTERN_C HRESULT WINAPI HrLanConnectionNameFromGuidOrPath (")
  242. cpp_quote(" /* [in] */ const GUID* pguid,")
  243. cpp_quote(" /* [in] */ LPCWSTR pszwPath,")
  244. cpp_quote(" /* [out] */ LPWSTR pszwName,")
  245. cpp_quote(" /* [inout] */ LPDWORD pcchMax);")
  246. cpp_quote("")
  247. cpp_quote("")
  248. cpp_quote("typedef HRESULT")
  249. cpp_quote("(WINAPI* PHRLANCONNECTIONNAMEFROMGUIDORPATH)(")
  250. cpp_quote(" const GUID*,")
  251. cpp_quote(" LPCWSTR,")
  252. cpp_quote(" LPWSTR,")
  253. cpp_quote(" LPDWORD")
  254. cpp_quote(" );")
  255. cpp_quote("")
  256. cpp_quote("")
  257. cpp_quote("EXTERN_C HRESULT WINAPI HrPnpInstanceIdFromGuid (")
  258. cpp_quote(" /* [in] */ const GUID* pguid,")
  259. cpp_quote(" /* [out] */ LPWSTR szwInstance,")
  260. cpp_quote(" /* [in] */ UINT cchInstance);")
  261. cpp_quote("")
  262. cpp_quote("")
  263. cpp_quote("typedef HRESULT")
  264. cpp_quote("(WINAPI* PHRPNPINSTANCEIDFROMGUID)(")
  265. cpp_quote(" const GUID*,")
  266. cpp_quote(" LPWSTR,")
  267. cpp_quote(" UINT")
  268. cpp_quote(" );")
  269. cpp_quote("")
  270. cpp_quote("")
  271. cpp_quote("EXTERN_C HRESULT WINAPI HrGetPnpDeviceStatus (")
  272. cpp_quote(" /* [in] */ const GUID* pguid,")
  273. cpp_quote(" /* [out] */ NETCON_STATUS *pStatus);")
  274. cpp_quote("")
  275. cpp_quote("")
  276. cpp_quote("typedef HRESULT")
  277. cpp_quote("(WINAPI* PHRGETPNPDEVICESTATUS)(")
  278. cpp_quote(" const GUID*,")
  279. cpp_quote(" NETCON_STATUS*")
  280. cpp_quote(" );")
  281. cpp_quote("")
  282. cpp_quote("")
  283. cpp_quote("EXTERN_C HRESULT WINAPI HrQueryLanMediaState (")
  284. cpp_quote(" /* [in] */ const GUID* pguid,")
  285. cpp_quote(" /* [out] */ BOOL *pfEnabled);")
  286. cpp_quote("")
  287. cpp_quote("")
  288. cpp_quote("typedef HRESULT")
  289. cpp_quote("(WINAPI* PHRQUERYLANMEDIASTATE)(")
  290. cpp_quote(" const GUID*,")
  291. cpp_quote(" BOOL*")
  292. cpp_quote(" );")
  293. cpp_quote("")
  294. //+---------------------------------------------------------------------------
  295. // INetSharedAccessConnection -
  296. //
  297. [
  298. object,
  299. uuid(FAEDCF55-31FE-11D1-AAD2-00805FC1270E),
  300. pointer_default(unique)
  301. ]
  302. interface INetSharedAccessConnection : IUnknown
  303. {
  304. typedef enum tagSHAREDACCESSCON_INFO_FLAGS
  305. {
  306. SACIF_ICON = 0x1,
  307. SACIF_ALL = 0xFF,
  308. } SHAREDACCESSCON_INFO_FLAGS;
  309. typedef struct tagSHAREDACCESSCON_INFO
  310. {
  311. BOOL fShowIcon;
  312. } SHAREDACCESSCON_INFO;
  313. HRESULT GetInfo (
  314. [in] DWORD dwMask,
  315. [out] SHAREDACCESSCON_INFO* pLanConInfo);
  316. HRESULT SetInfo (
  317. [in] DWORD dwMask,
  318. [in] const SHAREDACCESSCON_INFO* pLanConInfo);
  319. typedef enum tagSAHOST_SERVICES
  320. {
  321. SAHOST_SERVICE_OSINFO = 0,
  322. SAHOST_SERVICE_WANCOMMONINTERFACECONFIG,
  323. SAHOST_SERVICE_WANIPCONNECTION,
  324. SAHOST_SERVICE_WANPPPCONNECTION,
  325. SAHOST_SERVICE_NATSTATICPORTMAPPING,
  326. SAHOST_SERVICE_MAX,
  327. } SAHOST_SERVICES;
  328. HRESULT GetLocalAdapterGUID([out] GUID* pGuid);
  329. HRESULT GetService([in] SAHOST_SERVICES ulService, [out] IUPnPService** ppService);
  330. };
  331. //+---------------------------------------------------------------------------
  332. // INetLanConnectionWizardUi -
  333. //
  334. [
  335. local,
  336. object,
  337. uuid(FAEDCF56-31FE-11D1-AAD2-00805FC1270E),
  338. pointer_default(unique)
  339. ]
  340. interface INetLanConnectionWizardUi : IUnknown
  341. {
  342. HRESULT SetDeviceComponent (
  343. [in] const GUID* pguid);
  344. };
  345. //+---------------------------------------------------------------------------
  346. // INetRasConnection -
  347. //
  348. [
  349. object,
  350. uuid(FAEDCF57-31FE-11D1-AAD2-00805FC1270E),
  351. pointer_default(unique)
  352. ]
  353. interface INetRasConnection : IUnknown
  354. {
  355. typedef struct tagRASCON_INFO
  356. {
  357. [string] LPWSTR pszwPbkFile;
  358. [string] LPWSTR pszwEntryName;
  359. GUID guidId;
  360. } RASCON_INFO;
  361. HRESULT GetRasConnectionInfo (
  362. [out] RASCON_INFO* pRasConInfo);
  363. HRESULT SetRasConnectionInfo (
  364. [in] const RASCON_INFO* pRasConInfo);
  365. HRESULT GetRasConnectionHandle(
  366. [out] ULONG_PTR* phRasConn);
  367. };
  368. //+---------------------------------------------------------------------------
  369. // INetDefaultConnection -
  370. //
  371. [
  372. object,
  373. uuid(FAEDCF66-31FE-11D1-AAD2-00805FC1270E),
  374. pointer_default(unique)
  375. ]
  376. interface INetDefaultConnection : IUnknown
  377. {
  378. HRESULT SetDefault ([in] BOOL bDefault);
  379. HRESULT GetDefault ([out] BOOL* pbDefault);
  380. };
  381. //+---------------------------------------------------------------------------
  382. // INetRasConnectionIpUiInfo -
  383. //
  384. [
  385. object,
  386. uuid(FAEDCF58-31FE-11D1-AAD2-00805FC1270E),
  387. pointer_default(unique)
  388. ]
  389. interface INetRasConnectionIpUiInfo : IUnknown
  390. {
  391. typedef enum tagRASCON_IPUI_FLAGS
  392. {
  393. RCUIF_PPP = 0x01,
  394. RCUIF_SLIP = 0x02,
  395. RCUIF_USE_IP_ADDR = 0x04,
  396. RCUIF_USE_NAME_SERVERS = 0x08,
  397. RCUIF_USE_REMOTE_GATEWAY = 0x10,
  398. RCUIF_USE_HEADER_COMPRESSION = 0x20,
  399. RCUIF_VPN = 0x40,
  400. RCUIF_DEMAND_DIAL = 0x80,
  401. RCUIF_USE_DISABLE_REGISTER_DNS = 0x0100,
  402. RCUIF_USE_PRIVATE_DNS_SUFFIX = 0x0200,
  403. RCUIF_NOT_ADMIN = 0x0400,
  404. RCUIF_ENABLE_NBT = 0x0800
  405. } RASCON_UIINFO_FLAGS;
  406. typedef struct tagRASCON_IPUI
  407. {
  408. // This is the GUID of the phonebook entry and can be used as the
  409. // GUID of the 'fake' RAS adapter to TCP/IP.
  410. //
  411. GUID guidConnection;
  412. // dwFlags defines how to interpret rest of the data.
  413. // RCUIF_SLIP : pszwIpAddr et al. must be specified
  414. // RCUIF_USE_IP_ADDR : use pszwIpAddr, otherwise automatic
  415. // RCUIF_USE_NAME_SERVERS : use Dns and Wins address, otherwise automatic
  416. // RCUIF_USE_REMOTE_GATEWAY : prioritize remote network
  417. // RCUIF_USE_HEADER_COMPRESSION : use IP header compression
  418. // RCUIF_VPN : use IP header compression should be disabled
  419. //
  420. DWORD dwFlags;
  421. // 16 characters for an IP address is adequate for the form
  422. // aaa.bbb.ccc.ddd\0
  423. //
  424. WCHAR pszwIpAddr [16];
  425. WCHAR pszwDnsAddr [16];
  426. WCHAR pszwDns2Addr [16];
  427. WCHAR pszwWinsAddr [16];
  428. WCHAR pszwWins2Addr [16];
  429. DWORD dwFrameSize;
  430. WCHAR pszwDnsSuffix[256];
  431. } RASCON_IPUI;
  432. HRESULT GetUiInfo (
  433. [out] RASCON_IPUI* pInfo);
  434. };
  435. //+---------------------------------------------------------------------------
  436. // IPersistNetConnection -
  437. //
  438. [
  439. object,
  440. uuid(FAEDCF59-31FE-11D1-AAD2-00805FC1270E),
  441. pointer_default(unique)
  442. ]
  443. interface IPersistNetConnection : IPersist
  444. {
  445. HRESULT GetSizeMax (
  446. [out] ULONG* pcbSize);
  447. HRESULT Load (
  448. [in, size_is(cbSize)] const BYTE* pbBuf,
  449. [in] ULONG cbSize);
  450. HRESULT Save (
  451. [out, size_is(cbSize)] BYTE* pbBuf,
  452. [in] ULONG cbSize);
  453. };
  454. //+---------------------------------------------------------------------------
  455. // Network Connection Branding Information
  456. //
  457. [
  458. object,
  459. uuid(FAEDCF5B-31FE-11D1-AAD2-00805FC1270E),
  460. pointer_default(unique)
  461. ]
  462. interface INetConnectionBrandingInfo : IUnknown
  463. {
  464. typedef struct tagCON_BRANDING_INFO
  465. {
  466. [string] LPWSTR szwLargeIconPath;
  467. [string] LPWSTR szwSmallIconPath;
  468. [string] LPWSTR szwTrayIconPath;
  469. } CON_BRANDING_INFO;
  470. HRESULT GetBrandingIconPaths(
  471. [out] CON_BRANDING_INFO ** ppConBrandInfo);
  472. typedef struct tagCON_TRAY_MENU_ENTRY
  473. {
  474. [string] LPWSTR szwMenuText;
  475. [string] LPWSTR szwMenuCmdLine;
  476. [string] LPWSTR szwMenuParams;
  477. } CON_TRAY_MENU_ENTRY;
  478. typedef struct tagCON_TRAY_MENU_DATA
  479. {
  480. DWORD dwCount;
  481. [ size_is(dwCount) ] CON_TRAY_MENU_ENTRY * pctme;
  482. } CON_TRAY_MENU_DATA;
  483. HRESULT GetTrayMenuEntries(
  484. [out] CON_TRAY_MENU_DATA ** ppMenuData);
  485. };
  486. //+---------------------------------------------------------------------------
  487. // Network Connection 2 interfaces.
  488. //
  489. [
  490. object,
  491. uuid(FAEDCF69-31FE-11D1-AAD2-00805FC1270E),
  492. pointer_default(unique)
  493. ]
  494. interface INetConnectionManager2 : IUnknown
  495. {
  496. HRESULT EnumConnectionProperties(
  497. [out] LPSAFEARRAY* ppsaConnectionProperties);
  498. };
  499. [
  500. object,
  501. uuid(FAEDCF6A-31FE-11D1-AAD2-00805FC1270E),
  502. pointer_default(unique)
  503. ]
  504. interface INetConnection2 : IUnknown
  505. {
  506. typedef enum tagNETCON_SUBMEDIATYPE
  507. {
  508. NCSM_NONE,
  509. NCSM_LAN,
  510. NCSM_WIRELESS,
  511. NCSM_ATM,
  512. NCSM_ELAN,
  513. NCSM_1394,
  514. NCSM_DIRECT,
  515. NCSM_IRDA,
  516. NCSM_CM
  517. } NETCON_SUBMEDIATYPE;
  518. typedef struct tagNETCON_PROPERTIES_EX
  519. {
  520. DWORD dwSize;
  521. GUID guidId;
  522. BSTR bstrName;
  523. BSTR bstrDeviceName;
  524. NETCON_STATUS ncStatus;
  525. NETCON_MEDIATYPE ncMediaType;
  526. NETCON_SUBMEDIATYPE ncSubMediaType;
  527. DWORD dwCharacter;
  528. CLSID clsidThisObject;
  529. CLSID clsidUiObject;
  530. BSTR bstrPhoneOrHostAddress;
  531. BSTR bstrPersistData;
  532. } NETCON_PROPERTIES_EX;
  533. HRESULT GetPropertiesEx(
  534. [out] NETCON_PROPERTIES_EX** ppConnectionPropertiesEx);
  535. };
  536. //+---------------------------------------------------------------------------
  537. // Network Connection Notify Sink
  538. //
  539. [
  540. object,
  541. uuid(FAEDCF5C-31FE-11D1-AAD2-00805FC1270E),
  542. pointer_default(unique)
  543. ]
  544. interface INetConnectionNotifySink : IUnknown
  545. {
  546. HRESULT
  547. ConnectionAdded (
  548. [in] const NETCON_PROPERTIES_EX* pPropsEx);
  549. HRESULT
  550. ConnectionBandWidthChange (
  551. [in] const GUID* pguidId);
  552. HRESULT
  553. ConnectionDeleted (
  554. [in] const GUID* pguidId);
  555. HRESULT
  556. ConnectionModified (
  557. [in] const NETCON_PROPERTIES_EX* pPropsEx);
  558. HRESULT
  559. ConnectionRenamed (
  560. [in] const GUID* pguidId,
  561. [in, string] LPCWSTR pszwNewName);
  562. HRESULT
  563. ConnectionStatusChange (
  564. [in] const GUID* pguidId,
  565. [in] NETCON_STATUS Status);
  566. HRESULT
  567. RefreshAll ();
  568. HRESULT
  569. ConnectionAddressChange(
  570. [in] const GUID* pguidId );
  571. HRESULT
  572. ShowBalloon (
  573. [in] const GUID* pguidId,
  574. [in] const BSTR szCookie,
  575. [in] const BSTR szBalloonText);
  576. HRESULT
  577. DisableEvents (
  578. [in] const BOOL fDisable,
  579. [in] const ULONG ulDisableTimeout);
  580. };
  581. //+---------------------------------------------------------------------------
  582. // INetConnectionUiUtilities -
  583. //
  584. [
  585. local,
  586. object,
  587. uuid(FAEDCF5E-31FE-11D1-AAD2-00805FC1270E),
  588. pointer_default(unique)
  589. ]
  590. interface INetConnectionUiUtilities : IUnknown
  591. {
  592. HRESULT QueryUserAndRemoveComponent(
  593. HWND hwndParent,
  594. INetCfg* pnc,
  595. INetCfgComponent* pncc);
  596. typedef enum tagQUERY_USER_FOR_REBOOT_FLAGS
  597. {
  598. QUFR_PROMPT = 0x1,
  599. QUFR_REBOOT = 0x2
  600. } QUERY_USER_FOR_REBOOT_FLAGS;
  601. HRESULT QueryUserForReboot(
  602. HWND hwndParent,
  603. LPCTSTR pszCaption,
  604. DWORD dwFlags);
  605. HRESULT DisplayAddComponentDialog (
  606. HWND hwndParent,
  607. INetCfg* pnc,
  608. CI_FILTER_INFO* pcfi);
  609. typedef enum tagNCPERM_FLAGS
  610. {
  611. NCPERM_NewConnectionWizard = 0,
  612. NCPERM_Statistics = 1,
  613. NCPERM_AddRemoveComponents = 2,
  614. NCPERM_RasConnect = 3,
  615. NCPERM_LanConnect = 4,
  616. NCPERM_DeleteConnection = 5,
  617. NCPERM_DeleteAllUserConnection = 6,
  618. NCPERM_RenameConnection = 7,
  619. NCPERM_RenameMyRasConnection = 8,
  620. NCPERM_ChangeBindState = 9,
  621. NCPERM_AdvancedSettings = 10,
  622. NCPERM_DialupPrefs = 11,
  623. NCPERM_LanChangeProperties = 12,
  624. NCPERM_RasChangeProperties = 13,
  625. NCPERM_LanProperties = 14,
  626. NCPERM_RasMyProperties = 15,
  627. NCPERM_RasAllUserProperties = 16,
  628. NCPERM_ShowSharedAccessUi = 17,
  629. NCPERM_AllowAdvancedTCPIPConfig = 18,
  630. NCPERM_OpenConnectionsFolder = 19,
  631. NCPERM_PersonalFirewallConfig = 20,
  632. NCPERM_AllowNetBridge_NLA = 21,
  633. NCPERM_ICSClientApp = 22,
  634. NCPERM_EnDisComponentsAllUserRas = 23,
  635. NCPERM_EnDisComponentsMyRas = 24,
  636. NCPERM_ChangeMyRasProperties = 25,
  637. NCPERM_ChangeAllUserRasProperties = 26,
  638. NCPERM_RenameLanConnection = 27,
  639. NCPERM_RenameAllUserRasConnection = 28,
  640. NCPERM_IpcfgOperation = 29,
  641. NCPERM_Repair = 30
  642. } NCPERM_FLAGS;
  643. BOOL UserHasPermission(DWORD dwPerm);
  644. };
  645. [
  646. object,
  647. uuid(FAEDCF5F-31FE-11D1-AAD2-00805FC1270E),
  648. pointer_default(unique)
  649. ]
  650. interface INetConnectionRefresh : IUnknown
  651. {
  652. HRESULT
  653. RefreshAll();
  654. HRESULT
  655. ConnectionAdded(
  656. [in] INetConnection* pConnection);
  657. HRESULT
  658. ConnectionDeleted (
  659. [in] const GUID* pguidId);
  660. HRESULT
  661. ConnectionModified (
  662. [in] INetConnection* pConnection);
  663. HRESULT
  664. ConnectionRenamed (
  665. [in] INetConnection* pConnection);
  666. HRESULT
  667. ConnectionStatusChanged (
  668. [in] const GUID* pguidId,
  669. [in] const NETCON_STATUS ncs );
  670. HRESULT
  671. ShowBalloon (
  672. [in] const GUID* pguidId,
  673. [in] const BSTR szCookie,
  674. [in] const BSTR szBalloonText);
  675. HRESULT
  676. DisableEvents (
  677. [in] const BOOL fDisable,
  678. [in] const ULONG ulDisableTimeout);
  679. };
  680. [
  681. object,
  682. uuid(FAEDCF60-31FE-11D1-AAD2-00805FC1270E),
  683. pointer_default(unique)
  684. ]
  685. interface INetConnectionCMUtil : IUnknown
  686. {
  687. HRESULT MapCMHiddenConnectionToOwner([in] REFGUID guidHidden, [out] GUID * pguidOwner);
  688. };
  689. [
  690. object,
  691. uuid(FAEDCF64-31FE-11D1-AAD2-00805FC1270E),
  692. pointer_default(unique)
  693. ]
  694. interface INetConnectionHNetUtil : IUnknown
  695. {
  696. HRESULT NotifyUpdate();
  697. };
  698. //+---------------------------------------------------------------------------
  699. // INetConnectionSysTray -
  700. //
  701. [
  702. object,
  703. uuid(FAEDCF65-31FE-11D1-AAD2-00805FC1270E),
  704. pointer_default(unique)
  705. ]
  706. interface INetConnectionSysTray : IUnknown
  707. {
  708. HRESULT ShowIcon(
  709. [in] const BOOL bShowIcon);
  710. HRESULT IconStateChanged();
  711. };
  712. //+---------------------------------------------------------------------------
  713. // INetConnectionMachinePolicies -
  714. //
  715. [
  716. object,
  717. uuid(FAEDCF68-31FE-11D1-AAD2-00805FC1270E),
  718. pointer_default(unique)
  719. ]
  720. interface INetMachinePolicies : IUnknown
  721. {
  722. HRESULT VerifyPermission(
  723. [in] const DWORD ulPerm,
  724. [out] BOOL* pPermission);
  725. };
  726. //#if DBG DBG not defined for MIDL :(
  727. //+---------------------------------------------------------------------------
  728. // Network Connection Debug interface
  729. //
  730. [
  731. object,
  732. uuid(FAEDCF5D-31FE-11D1-AAD2-00805FC1270E),
  733. pointer_default(unique)
  734. ]
  735. interface INetConnectionManagerDebug : IUnknown
  736. {
  737. HRESULT
  738. NotifyTestStart ();
  739. HRESULT
  740. NotifyTestStop ();
  741. };
  742. //#endif // DBG
  743. [
  744. uuid(FAEDCF6B-31FE-11D1-AAD2-00805FC1270E),
  745. pointer_default(unique)
  746. ]
  747. interface ISharedAccessBeacon : IUnknown
  748. {
  749. HRESULT GetMediaType([out] NETCON_MEDIATYPE* pMediaType);
  750. HRESULT GetLocalAdapterGUID([out] GUID* pGuid);
  751. HRESULT GetService([in] SAHOST_SERVICES ulService, [out] IUPnPService**);
  752. HRESULT GetUniqueDeviceName([out] BSTR* pUDN);
  753. };
  754. //+---------------------------------------------------------------------------
  755. // Shared Access Beacon Finder - This interface is for CSharedAccessConnection only, others should go through INetSharedAccessConnection
  756. //
  757. [
  758. uuid(FAEDCF67-31FE-11D1-AAD2-00805FC1270E),
  759. pointer_default(unique)
  760. ]
  761. interface ISharedAccessBeaconFinder : IUnknown
  762. {
  763. typedef struct tagSHAREDACCESS_HOST_INFO
  764. {
  765. BSTR WANAccessType;
  766. IUPnPService* pOSInfo;
  767. IUPnPService* pWANCommonInterfaceConfig;
  768. IUPnPService* pWANConnection;
  769. GUID LocalAdapterGuid;
  770. } SHAREDACCESS_HOST_INFO;
  771. HRESULT GetSharedAccessBeacon([in] BSTR DeviceId, [out] ISharedAccessBeacon** ppSharedAccessBeacon);
  772. };
  773. cpp_quote("")
  774. cpp_quote("EXTERN_C HRESULT WINAPI HrGetIconFromMediaType (")
  775. cpp_quote(" /* [in] */ DWORD dwIconSize,")
  776. cpp_quote(" /* [in] */ NETCON_MEDIATYPE ncm,")
  777. cpp_quote(" /* [in] */ NETCON_SUBMEDIATYPE ncsm,")
  778. cpp_quote(" /* [in] */ DWORD dwConnectionIcon,")
  779. cpp_quote(" /* [in] */ DWORD dwCharacteristics,")
  780. cpp_quote(" /* [out] */ HICON *phIcon);")
  781. cpp_quote("")