2 * Copyright 2009 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 /* import "prsht.idl"; */
26 cpp_quote
("DEFINE_GUID(CLSID_NetSharingManager,0x5c63c1ad,0x3956,0x4ff8,0x84,0x86,0x40,0x03,0x47,0x58,0x31,0x5b);")
30 uuid(c08956a1
-1cd3
-11d1
-b1c5
-00805fc1270e
),
31 pointer_default(unique)
33 interface INetConnection
: IUnknown
35 typedef enum tagNETCON_CHARACTERISTIC_FLAGS
38 NCCF_ALL_USERS
= 0x0001,
39 NCCF_ALLOW_DUPLICATION
= 0x0002,
40 NCCF_ALLOW_REMOVAL
= 0x0004,
41 NCCF_ALLOW_RENAME
= 0x0008,
42 NCCF_INCOMING_ONLY
= 0x0020,
43 NCCF_OUTGOING_ONLY
= 0x0040,
44 NCCF_BRANDED
= 0x0080,
46 NCCF_BRIDGED
= 0x0200,
47 NCCF_FIREWALLED
= 0x0400,
48 NCCF_DEFAULT
= 0x0800,
49 NCCF_HOMENET_CAPABLE
= 0x1000,
50 NCCF_SHARED_PRIVATE
= 0x2000,
51 NCCF_QUARANTINED
= 0x4000,
52 NCCF_RESERVED
= 0x8000,
53 NCCF_BLUETOOTH_MASK
= 0x000F0000,
54 NCCF_LAN_MASK
= 0x00F00000
55 } NETCON_CHARACTERISTIC_FLAGS
;
57 typedef enum tagNETCON_STATUS
63 NCS_HARDWARE_NOT_PRESENT
,
64 NCS_HARDWARE_DISABLED
,
65 NCS_HARDWARE_MALFUNCTION
,
66 NCS_MEDIA_DISCONNECTED
,
68 NCS_AUTHENTICATION_SUCCEEDED
,
69 NCS_AUTHENTICATION_FAILED
,
71 NCS_CREDENTIALS_REQUIRED
74 typedef enum tagNETCON_TYPE
85 typedef enum tagNETCON_MEDIATYPE
95 NCM_SHAREDACCESSHOST_LAN
,
96 NCM_SHAREDACCESSHOST_RAS
99 typedef struct tagNETCON_PROPERTIES
102 [string] LPWSTR pszwName
;
103 [string] LPWSTR pszwDeviceName
;
104 NETCON_STATUS Status
;
105 NETCON_MEDIATYPE MediaType
;
107 CLSID clsidThisObject
;
113 HRESULT Disconnect
();
118 [in, string] LPCWSTR pszwDuplicateName
,
119 [out] INetConnection
**ppCon
);
121 HRESULT GetProperties
([out] NETCON_PROPERTIES
**ppProps
);
123 HRESULT GetUiObjectClassId
([out, ref] CLSID
*pclsid
);
125 HRESULT Rename
([in, string] LPCWSTR pszwNewName
);
130 uuid(24b7e9b5
-e38f
-4685-851b
-00892cf5f940
),
133 pointer_default(unique)
135 interface INetSharingPortMappingProps
: IDispatch
138 HRESULT Name
([out, retval] BSTR *pbstrName
);
141 HRESULT IPProtocol
([out, retval] UCHAR
*pucIPProt
);
144 HRESULT ExternalPort
([out, retval] long *pusPort
);
147 HRESULT InternalPort
([out, retval] long *pusPort
);
150 HRESULT Options
([out, retval] long *pdwOptions
);
153 HRESULT TargetName
([out, retval] BSTR *pbstrTargetName
);
156 HRESULT TargetIPAddress
([out, retval] BSTR *pbstrTargetIPAddress
);
159 HRESULT Enabled
([out, retval] VARIANT_BOOL *pbool
);
164 uuid(c08956b1
-1cd3
-11d1
-b1c5
-00805fc1270e
),
167 pointer_default(unique)
169 interface INetSharingPortMapping
: IDispatch
178 HRESULT Properties
([out, retval] INetSharingPortMappingProps
**ppNSPMP
);
185 uuid(02e4a2de
-da20
-4e34
-89c8
-ac22275a010b
),
188 pointer_default(unique)
190 interface INetSharingPortMappingCollection
: IDispatch
192 [propget, id(DISPID_NEWENUM
), restricted]
193 HRESULT _NewEnum
([out, retval] IUnknown
**pVal
);
196 HRESULT Count
([out, retval] long *pVal
);
201 uuid(c08956b6
-1cd3
-11d1
-b1c5
-00805fc1270e
),
204 pointer_default(unique)
206 interface INetSharingConfiguration
: IDispatch
208 typedef enum tagSHARINGCONNECTIONTYPE
{
209 ICSSHARINGTYPE_PUBLIC
,
210 ICSSHARINGTYPE_PRIVATE
211 } SHARINGCONNECTIONTYPE
, *LPSHARINGCONNECTIONTYPE
;
213 typedef enum tagSHARINGCONNECTION_ENUM_FLAGS
{
216 } SHARINGCONNECTION_ENUM_FLAGS
;
218 typedef enum tagICS_TARGETTYPE
{
224 HRESULT SharingEnabled
([out, retval] VARIANT_BOOL *pbEnabled
);
227 HRESULT SharingConnectionType
([out, retval] SHARINGCONNECTIONTYPE
*pType
);
230 HRESULT DisableSharing
();
233 HRESULT EnableSharing
([in] SHARINGCONNECTIONTYPE Type
);
236 HRESULT InternetFirewallEnabled
([out, retval] VARIANT_BOOL *pbEnabled
);
239 HRESULT DisableInternetFirewall
();
242 HRESULT EnableInternetFirewall
();
245 HRESULT EnumPortMappings
(
246 [in] SHARINGCONNECTION_ENUM_FLAGS Flags
,
247 [out, retval] INetSharingPortMappingCollection
**ppColl
);
250 HRESULT AddPortMapping
(
252 [in] UCHAR ucIPProtocol
,
253 [in] USHORT usExternalPort
,
254 [in] USHORT usInternalPort
,
255 [in] DWORD dwOptions
,
256 [in] BSTR bstrTargetNameOrIPAddress
,
257 [in] ICS_TARGETTYPE eTargetType
,
258 [out, retval] INetSharingPortMapping
**ppMapping
);
261 HRESULT RemovePortMapping
([in] INetSharingPortMapping
*pMapping
);
266 uuid(c08956b4
-1cd3
-11d1
-b1c5
-00805fc1270e
),
267 pointer_default(unique)
269 interface IEnumNetSharingPublicConnection
: IUnknown
273 [out, size_is(celt
), length_is(*pceltFetched
)] VARIANT *rgVar
,
274 [out] ULONG
*pceltFetched
);
276 HRESULT Skip
([in] ULONG celt
);
280 HRESULT Clone
([out] IEnumNetSharingPublicConnection
**ppenum
);
285 uuid(c08956b5
-1cd3
-11d1
-b1c5
-00805fc1270e
),
286 pointer_default(unique)
288 interface IEnumNetSharingPrivateConnection
: IUnknown
292 [out, size_is(celt
), length_is(*pCeltFetched
)] VARIANT *rgVar
,
293 [out] ULONG
*pCeltFetched
);
295 HRESULT Skip
([in] ULONG celt
);
299 HRESULT Clone
([out] IEnumNetSharingPrivateConnection
**ppenum
);
304 uuid(f4277c95
-ce5b
-463d
-8167-5662d9bcaa72
),
307 pointer_default(unique)
309 interface INetConnectionProps
: IDispatch
312 HRESULT Guid
([out, retval] BSTR *pbstrGuid
);
315 HRESULT Name
([out, retval] BSTR *pbstrName
);
318 HRESULT DeviceName
([out, retval] BSTR *pbstrDeviceName
);
321 HRESULT Status
([out, retval] NETCON_STATUS
*pStatus
);
324 HRESULT MediaType
([out, retval] NETCON_MEDIATYPE
*pMediaType
);
327 HRESULT Characteristics
([out, retval] DWORD
*pdwFlags
);
332 uuid(7d7a6355
-f372
-4971-a149
-bfc927be762a
),
335 pointer_default(unique)
337 interface INetSharingPublicConnectionCollection
: IDispatch
339 [propget, id(DISPID_NEWENUM
), restricted]
340 HRESULT _NewEnum
([out, retval] IUnknown
**pVal
);
343 HRESULT Count
([out, retval] long *pVal
);
348 uuid(33c4643c
-7811-46fa
-a89a
-768597bd7223
),
351 pointer_default(unique)
353 interface INetSharingEveryConnectionCollection
: IDispatch
355 [propget, id(DISPID_NEWENUM
), restricted]
356 HRESULT _NewEnum
([out, retval] IUnknown
**pVal
);
359 HRESULT Count
([out, retval] long *pVal
);
364 uuid(38ae69e0
-4409-402a
-a2cb
-e965c727f840
),
367 pointer_default(unique)
369 interface INetSharingPrivateConnectionCollection
: IDispatch
371 [propget, id(DISPID_NEWENUM
), restricted]
372 HRESULT _NewEnum
([out, retval] IUnknown
**pVal
);
375 HRESULT Count
([out, retval] long *pVal
);
380 uuid(c08956b7
-1cd3
-11d1
-b1c5
-00805fc1270e
),
383 pointer_default(unique)
385 interface INetSharingManager
: IDispatch
388 HRESULT SharingInstalled
([out, retval] VARIANT_BOOL *pbInstalled
);
391 HRESULT EnumPublicConnections
(
392 [in] SHARINGCONNECTION_ENUM_FLAGS Flags
,
393 [out, retval] INetSharingPublicConnectionCollection
**ppColl
);
396 HRESULT EnumPrivateConnections
(
397 [in] SHARINGCONNECTION_ENUM_FLAGS Flags
,
398 [out, retval] INetSharingPrivateConnectionCollection
**ppColl
);
401 HRESULT INetSharingConfigurationForINetConnection
(
402 [in] INetConnection
*pNetConnection
,
403 [out, retval] INetSharingConfiguration
**ppNetSharingConfiguration
);
406 HRESULT EnumEveryConnection
([out, retval] INetSharingEveryConnectionCollection
**ppColl
);
409 HRESULT NetConnectionProps
(
410 [in] INetConnection
*pNetConnection
,
411 [out, retval] INetConnectionProps
**ppProps
);