ReactOS  0.4.14-dev-599-g2d4d3f5
port.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "natupnp.h"
#include "wine/heap.h"
#include "wine/debug.h"
#include "hnetcfg_private.h"
Include dependency graph for port.c:

Go to the source code of this file.

Classes

struct  fw_port
 
struct  fw_ports
 
struct  _upnpnat
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct fw_port fw_port
 
typedef struct fw_ports fw_ports
 
typedef struct _upnpnat upnpnat
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (hnetcfg)
 
static fw_portimpl_from_INetFwOpenPort (INetFwOpenPort *iface)
 
static ULONG WINAPI fw_port_AddRef (INetFwOpenPort *iface)
 
static ULONG WINAPI fw_port_Release (INetFwOpenPort *iface)
 
static HRESULT WINAPI fw_port_QueryInterface (INetFwOpenPort *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI fw_port_GetTypeInfoCount (INetFwOpenPort *iface, UINT *pctinfo)
 
static HRESULT WINAPI fw_port_GetTypeInfo (INetFwOpenPort *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI fw_port_GetIDsOfNames (INetFwOpenPort *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI fw_port_Invoke (INetFwOpenPort *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI fw_port_get_Name (INetFwOpenPort *iface, BSTR *name)
 
static HRESULT WINAPI fw_port_put_Name (INetFwOpenPort *iface, BSTR name)
 
static HRESULT WINAPI fw_port_get_IpVersion (INetFwOpenPort *iface, NET_FW_IP_VERSION *ipVersion)
 
static HRESULT WINAPI fw_port_put_IpVersion (INetFwOpenPort *iface, NET_FW_IP_VERSION ipVersion)
 
static HRESULT WINAPI fw_port_get_Protocol (INetFwOpenPort *iface, NET_FW_IP_PROTOCOL *ipProtocol)
 
static HRESULT WINAPI fw_port_put_Protocol (INetFwOpenPort *iface, NET_FW_IP_PROTOCOL ipProtocol)
 
static HRESULT WINAPI fw_port_get_Port (INetFwOpenPort *iface, LONG *portNumber)
 
static HRESULT WINAPI fw_port_put_Port (INetFwOpenPort *iface, LONG portNumber)
 
static HRESULT WINAPI fw_port_get_Scope (INetFwOpenPort *iface, NET_FW_SCOPE *scope)
 
static HRESULT WINAPI fw_port_put_Scope (INetFwOpenPort *iface, NET_FW_SCOPE scope)
 
static HRESULT WINAPI fw_port_get_RemoteAddresses (INetFwOpenPort *iface, BSTR *remoteAddrs)
 
static HRESULT WINAPI fw_port_put_RemoteAddresses (INetFwOpenPort *iface, BSTR remoteAddrs)
 
static HRESULT WINAPI fw_port_get_Enabled (INetFwOpenPort *iface, VARIANT_BOOL *enabled)
 
static HRESULT WINAPI fw_port_put_Enabled (INetFwOpenPort *iface, VARIANT_BOOL enabled)
 
static HRESULT WINAPI fw_port_get_BuiltIn (INetFwOpenPort *iface, VARIANT_BOOL *builtIn)
 
HRESULT NetFwOpenPort_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 
static fw_portsimpl_from_INetFwOpenPorts (INetFwOpenPorts *iface)
 
static ULONG WINAPI fw_ports_AddRef (INetFwOpenPorts *iface)
 
static ULONG WINAPI fw_ports_Release (INetFwOpenPorts *iface)
 
static HRESULT WINAPI fw_ports_QueryInterface (INetFwOpenPorts *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI fw_ports_GetTypeInfoCount (INetFwOpenPorts *iface, UINT *pctinfo)
 
static HRESULT WINAPI fw_ports_GetTypeInfo (INetFwOpenPorts *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI fw_ports_GetIDsOfNames (INetFwOpenPorts *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI fw_ports_Invoke (INetFwOpenPorts *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI fw_ports_get_Count (INetFwOpenPorts *iface, LONG *count)
 
static HRESULT WINAPI fw_ports_Add (INetFwOpenPorts *iface, INetFwOpenPort *port)
 
static HRESULT WINAPI fw_ports_Remove (INetFwOpenPorts *iface, LONG portNumber, NET_FW_IP_PROTOCOL ipProtocol)
 
static HRESULT WINAPI fw_ports_Item (INetFwOpenPorts *iface, LONG portNumber, NET_FW_IP_PROTOCOL ipProtocol, INetFwOpenPort **openPort)
 
static HRESULT WINAPI fw_ports_get__NewEnum (INetFwOpenPorts *iface, IUnknown **newEnum)
 
HRESULT NetFwOpenPorts_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 
static upnpnatimpl_from_IUPnPNAT (IUPnPNAT *iface)
 
static HRESULT WINAPI upnpnat_QueryInterface (IUPnPNAT *iface, REFIID riid, void **object)
 
static ULONG WINAPI upnpnat_AddRef (IUPnPNAT *iface)
 
static ULONG WINAPI upnpnat_Release (IUPnPNAT *iface)
 
static HRESULT WINAPI upnpnat_GetTypeInfoCount (IUPnPNAT *iface, UINT *pctinfo)
 
static HRESULT WINAPI upnpnat_GetTypeInfo (IUPnPNAT *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI upnpnat_GetIDsOfNames (IUPnPNAT *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI upnpnat_Invoke (IUPnPNAT *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI upnpnat_get_StaticPortMappingCollection (IUPnPNAT *iface, IStaticPortMappingCollection **collection)
 
static HRESULT WINAPI upnpnat_get_DynamicPortMappingCollection (IUPnPNAT *iface, IDynamicPortMappingCollection **collection)
 
static HRESULT WINAPI upnpnat_get_NATEventManager (IUPnPNAT *iface, INATEventManager **manager)
 
HRESULT IUPnPNAT_create (IUnknown *outer, void **object)
 

Variables

static const struct INetFwOpenPortVtbl fw_port_vtbl
 
static const struct INetFwOpenPortsVtbl fw_ports_vtbl
 
static const IUPnPNATVtbl upnpnat_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file port.c.

Typedef Documentation

◆ fw_port

◆ fw_ports

◆ upnpnat

Function Documentation

◆ fw_port_AddRef()

static ULONG WINAPI fw_port_AddRef ( INetFwOpenPort iface)
static

Definition at line 51 of file port.c.

53 {
55  return InterlockedIncrement( &fw_port->refs );
56 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
LONG refs
Definition: port.c:40
#define InterlockedIncrement
Definition: armddk.h:53

◆ fw_port_get_BuiltIn()

static HRESULT WINAPI fw_port_get_BuiltIn ( INetFwOpenPort iface,
VARIANT_BOOL builtIn 
)
static

Definition at line 324 of file port.c.

327 {
329 
330  FIXME("%p %p\n", This, builtIn);
331  return E_NOTIMPL;
332 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_get_Enabled()

static HRESULT WINAPI fw_port_get_Enabled ( INetFwOpenPort iface,
VARIANT_BOOL enabled 
)
static

Definition at line 302 of file port.c.

305 {
307 
308  FIXME("%p %p\n", This, enabled);
309 
310  *enabled = VARIANT_TRUE;
311  return S_OK;
312 }
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ fw_port_get_IpVersion()

static HRESULT WINAPI fw_port_get_IpVersion ( INetFwOpenPort iface,
NET_FW_IP_VERSION ipVersion 
)
static

Definition at line 196 of file port.c.

199 {
201 
202  FIXME("%p %p\n", This, ipVersion);
203  return E_NOTIMPL;
204 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_get_Name()

static HRESULT WINAPI fw_port_get_Name ( INetFwOpenPort iface,
BSTR name 
)
static

Definition at line 170 of file port.c.

173 {
175 
176  FIXME("%p %p\n", This, name);
177  return E_NOTIMPL;
178 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: name.c:38

◆ fw_port_get_Port()

static HRESULT WINAPI fw_port_get_Port ( INetFwOpenPort iface,
LONG portNumber 
)
static

Definition at line 241 of file port.c.

244 {
246 
247  FIXME("%p %p\n", This, portNumber);
248  return E_NOTIMPL;
249 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_get_Protocol()

static HRESULT WINAPI fw_port_get_Protocol ( INetFwOpenPort iface,
NET_FW_IP_PROTOCOL ipProtocol 
)
static

Definition at line 216 of file port.c.

219 {
221 
222  FIXME("%p %p\n", This, ipProtocol);
223  return E_NOTIMPL;
224 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_get_RemoteAddresses()

static HRESULT WINAPI fw_port_get_RemoteAddresses ( INetFwOpenPort iface,
BSTR remoteAddrs 
)
static

Definition at line 282 of file port.c.

285 {
287 
288  FIXME("%p %p\n", This, remoteAddrs);
289  return E_NOTIMPL;
290 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_get_Scope()

static HRESULT WINAPI fw_port_get_Scope ( INetFwOpenPort iface,
NET_FW_SCOPE scope 
)
static

Definition at line 262 of file port.c.

265 {
267 
268  FIXME("%p %p\n", This, scope);
269  return E_NOTIMPL;
270 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_GetIDsOfNames()

static HRESULT WINAPI fw_port_GetIDsOfNames ( INetFwOpenPort iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 119 of file port.c.

126 {
129  HRESULT hr;
130 
131  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
132 
134  if (SUCCEEDED(hr))
135  {
136  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
137  ITypeInfo_Release( typeinfo );
138  }
139  return hr;
140 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ fw_port_GetTypeInfo()

static HRESULT WINAPI fw_port_GetTypeInfo ( INetFwOpenPort iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 107 of file port.c.

112 {
114 
115  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
116  return get_typeinfo( INetFwOpenPort_tid, ppTInfo );
117 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4

◆ fw_port_GetTypeInfoCount()

static HRESULT WINAPI fw_port_GetTypeInfoCount ( INetFwOpenPort iface,
UINT pctinfo 
)
static

Definition at line 96 of file port.c.

99 {
101 
102  TRACE("%p %p\n", This, pctinfo);
103  *pctinfo = 1;
104  return S_OK;
105 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ fw_port_Invoke()

static HRESULT WINAPI fw_port_Invoke ( INetFwOpenPort iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 142 of file port.c.

152 {
155  HRESULT hr;
156 
157  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
158  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
159 
161  if (SUCCEEDED(hr))
162  {
163  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwOpenPort_iface, dispIdMember,
164  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
165  ITypeInfo_Release( typeinfo );
166  }
167  return hr;
168 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ fw_port_put_Enabled()

static HRESULT WINAPI fw_port_put_Enabled ( INetFwOpenPort iface,
VARIANT_BOOL  enabled 
)
static

Definition at line 314 of file port.c.

317 {
319 
320  FIXME("%p %d\n", This, enabled);
321  return S_OK;
322 }
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59

◆ fw_port_put_IpVersion()

static HRESULT WINAPI fw_port_put_IpVersion ( INetFwOpenPort iface,
NET_FW_IP_VERSION  ipVersion 
)
static

Definition at line 206 of file port.c.

209 {
211 
212  FIXME("%p %u\n", This, ipVersion);
213  return E_NOTIMPL;
214 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_put_Name()

static HRESULT WINAPI fw_port_put_Name ( INetFwOpenPort iface,
BSTR  name 
)
static

Definition at line 180 of file port.c.

183 {
185 
186  TRACE("%p %s\n", This, debugstr_w(name));
187 
188  if (!(name = SysAllocString( name )))
189  return E_OUTOFMEMORY;
190 
191  SysFreeString( This->name );
192  This->name = name;
193  return S_OK;
194 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
Definition: name.c:38
GLuint const GLchar * name
Definition: glext.h:6031

◆ fw_port_put_Port()

static HRESULT WINAPI fw_port_put_Port ( INetFwOpenPort iface,
LONG  portNumber 
)
static

Definition at line 251 of file port.c.

254 {
256 
257  TRACE("%p %d\n", This, portNumber);
258  This->port = portNumber;
259  return S_OK;
260 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ fw_port_put_Protocol()

static HRESULT WINAPI fw_port_put_Protocol ( INetFwOpenPort iface,
NET_FW_IP_PROTOCOL  ipProtocol 
)
static

Definition at line 226 of file port.c.

229 {
231 
232  TRACE("%p %u\n", This, ipProtocol);
233 
234  if (ipProtocol != NET_FW_IP_PROTOCOL_TCP && ipProtocol != NET_FW_IP_PROTOCOL_UDP)
235  return E_INVALIDARG;
236 
237  This->protocol = ipProtocol;
238  return S_OK;
239 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ fw_port_put_RemoteAddresses()

static HRESULT WINAPI fw_port_put_RemoteAddresses ( INetFwOpenPort iface,
BSTR  remoteAddrs 
)
static

Definition at line 292 of file port.c.

295 {
297 
298  FIXME("%p %s\n", This, debugstr_w(remoteAddrs));
299  return E_NOTIMPL;
300 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_put_Scope()

static HRESULT WINAPI fw_port_put_Scope ( INetFwOpenPort iface,
NET_FW_SCOPE  scope 
)
static

Definition at line 272 of file port.c.

275 {
277 
278  FIXME("%p %u\n", This, scope);
279  return E_NOTIMPL;
280 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_port_QueryInterface()

static HRESULT WINAPI fw_port_QueryInterface ( INetFwOpenPort iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 72 of file port.c.

76 {
78 
79  TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
80 
81  if ( IsEqualGUID( riid, &IID_INetFwOpenPort ) ||
84  {
85  *ppvObject = iface;
86  }
87  else
88  {
89  FIXME("interface %s not implemented\n", debugstr_guid(riid));
90  return E_NOINTERFACE;
91  }
92  INetFwOpenPort_AddRef( iface );
93  return S_OK;
94 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ fw_port_Release()

static ULONG WINAPI fw_port_Release ( INetFwOpenPort iface)
static

Definition at line 58 of file port.c.

60 {
63  if (!refs)
64  {
65  TRACE("destroying %p\n", fw_port);
68  }
69  return refs;
70 }
static fw_port * impl_from_INetFwOpenPort(INetFwOpenPort *iface)
Definition: port.c:46
Definition: port.c:37
long LONG
Definition: pedump.c:60
BSTR name
Definition: port.c:41
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
LONG refs
Definition: port.c:40
#define InterlockedDecrement
Definition: armddk.h:52
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ fw_ports_Add()

static HRESULT WINAPI fw_ports_Add ( INetFwOpenPorts iface,
INetFwOpenPort port 
)
static

Definition at line 522 of file port.c.

525 {
527 
528  FIXME("%p, %p\n", This, port);
529  return S_OK;
530 }
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: port.c:381
#define S_OK
Definition: intsafe.h:59
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387
USHORT port
Definition: uri.c:228

◆ fw_ports_AddRef()

static ULONG WINAPI fw_ports_AddRef ( INetFwOpenPorts iface)
static

Definition at line 392 of file port.c.

394 {
396  return InterlockedIncrement( &fw_ports->refs );
397 }
LONG refs
Definition: port.c:384
Definition: port.c:381
#define InterlockedIncrement
Definition: armddk.h:53
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ fw_ports_get__NewEnum()

static HRESULT WINAPI fw_ports_get__NewEnum ( INetFwOpenPorts iface,
IUnknown **  newEnum 
)
static

Definition at line 563 of file port.c.

566 {
568 
569  FIXME("%p, %p\n", This, newEnum);
570  return E_NOTIMPL;
571 }
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: port.c:381
#define E_NOTIMPL
Definition: ddrawi.h:99
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ fw_ports_get_Count()

static HRESULT WINAPI fw_ports_get_Count ( INetFwOpenPorts iface,
LONG count 
)
static

Definition at line 510 of file port.c.

513 {
515 
516  FIXME("%p, %p\n", This, count);
517 
518  *count = 0;
519  return S_OK;
520 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: port.c:381
#define S_OK
Definition: intsafe.h:59
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ fw_ports_GetIDsOfNames()

static HRESULT WINAPI fw_ports_GetIDsOfNames ( INetFwOpenPorts iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 459 of file port.c.

466 {
469  HRESULT hr;
470 
471  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
472 
474  if (SUCCEEDED(hr))
475  {
476  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
477  ITypeInfo_Release( typeinfo );
478  }
479  return hr;
480 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
Definition: port.c:381
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ fw_ports_GetTypeInfo()

static HRESULT WINAPI fw_ports_GetTypeInfo ( INetFwOpenPorts iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 447 of file port.c.

452 {
454 
455  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
456  return get_typeinfo( INetFwOpenPorts_tid, ppTInfo );
457 }
Definition: port.c:381
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ fw_ports_GetTypeInfoCount()

static HRESULT WINAPI fw_ports_GetTypeInfoCount ( INetFwOpenPorts iface,
UINT pctinfo 
)
static

Definition at line 436 of file port.c.

439 {
441 
442  TRACE("%p %p\n", This, pctinfo);
443  *pctinfo = 1;
444  return S_OK;
445 }
Definition: port.c:381
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ fw_ports_Invoke()

static HRESULT WINAPI fw_ports_Invoke ( INetFwOpenPorts iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 482 of file port.c.

492 {
495  HRESULT hr;
496 
497  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
498  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
499 
501  if (SUCCEEDED(hr))
502  {
503  hr = ITypeInfo_Invoke( typeinfo, &This->INetFwOpenPorts_iface, dispIdMember,
504  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
505  ITypeInfo_Release( typeinfo );
506  }
507  return hr;
508 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
Definition: port.c:381
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ fw_ports_Item()

static HRESULT WINAPI fw_ports_Item ( INetFwOpenPorts iface,
LONG  portNumber,
NET_FW_IP_PROTOCOL  ipProtocol,
INetFwOpenPort **  openPort 
)
static

Definition at line 543 of file port.c.

548 {
549  HRESULT hr;
551 
552  FIXME("%p, %d, %u, %p\n", This, portNumber, ipProtocol, openPort);
553 
554  hr = NetFwOpenPort_create( NULL, (void **)openPort );
555  if (SUCCEEDED(hr))
556  {
557  INetFwOpenPort_put_Protocol( *openPort, ipProtocol );
558  INetFwOpenPort_put_Port( *openPort, portNumber );
559  }
560  return hr;
561 }
HRESULT hr
Definition: shlfolder.c:183
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
Definition: port.c:381
LONG HRESULT
Definition: typedefs.h:77
HRESULT NetFwOpenPort_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: port.c:360
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ fw_ports_QueryInterface()

static HRESULT WINAPI fw_ports_QueryInterface ( INetFwOpenPorts iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 412 of file port.c.

416 {
418 
419  TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
420 
421  if ( IsEqualGUID( riid, &IID_INetFwOpenPorts ) ||
424  {
425  *ppvObject = iface;
426  }
427  else
428  {
429  FIXME("interface %s not implemented\n", debugstr_guid(riid));
430  return E_NOINTERFACE;
431  }
432  INetFwOpenPorts_AddRef( iface );
433  return S_OK;
434 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: port.c:381
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ fw_ports_Release()

static ULONG WINAPI fw_ports_Release ( INetFwOpenPorts iface)
static

Definition at line 399 of file port.c.

401 {
404  if (!refs)
405  {
406  TRACE("destroying %p\n", fw_ports);
408  }
409  return refs;
410 }
LONG refs
Definition: port.c:384
long LONG
Definition: pedump.c:60
Definition: port.c:381
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
#define InterlockedDecrement
Definition: armddk.h:52
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ fw_ports_Remove()

static HRESULT WINAPI fw_ports_Remove ( INetFwOpenPorts iface,
LONG  portNumber,
NET_FW_IP_PROTOCOL  ipProtocol 
)
static

Definition at line 532 of file port.c.

536 {
538 
539  FIXME("%p, %d, %u\n", This, portNumber, ipProtocol);
540  return E_NOTIMPL;
541 }
#define FIXME(fmt,...)
Definition: debug.h:110
Definition: port.c:381
#define E_NOTIMPL
Definition: ddrawi.h:99
static fw_ports * impl_from_INetFwOpenPorts(INetFwOpenPorts *iface)
Definition: port.c:387

◆ impl_from_INetFwOpenPort()

static fw_port* impl_from_INetFwOpenPort ( INetFwOpenPort iface)
inlinestatic

Definition at line 46 of file port.c.

47 {
48  return CONTAINING_RECORD(iface, fw_port, INetFwOpenPort_iface);
49 }
Definition: port.c:37
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by fw_port_AddRef(), fw_port_get_BuiltIn(), fw_port_get_Enabled(), fw_port_get_IpVersion(), fw_port_get_Name(), fw_port_get_Port(), fw_port_get_Protocol(), fw_port_get_RemoteAddresses(), fw_port_get_Scope(), fw_port_GetIDsOfNames(), fw_port_GetTypeInfo(), fw_port_GetTypeInfoCount(), fw_port_Invoke(), fw_port_put_Enabled(), fw_port_put_IpVersion(), fw_port_put_Name(), fw_port_put_Port(), fw_port_put_Protocol(), fw_port_put_RemoteAddresses(), fw_port_put_Scope(), fw_port_QueryInterface(), and fw_port_Release().

◆ impl_from_INetFwOpenPorts()

static fw_ports* impl_from_INetFwOpenPorts ( INetFwOpenPorts iface)
inlinestatic

Definition at line 387 of file port.c.

388 {
389  return CONTAINING_RECORD(iface, fw_ports, INetFwOpenPorts_iface);
390 }
Definition: port.c:381
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by fw_ports_Add(), fw_ports_AddRef(), fw_ports_get__NewEnum(), fw_ports_get_Count(), fw_ports_GetIDsOfNames(), fw_ports_GetTypeInfo(), fw_ports_GetTypeInfoCount(), fw_ports_Invoke(), fw_ports_Item(), fw_ports_QueryInterface(), fw_ports_Release(), and fw_ports_Remove().

◆ impl_from_IUPnPNAT()

static upnpnat* impl_from_IUPnPNAT ( IUPnPNAT iface)
inlinestatic

Definition at line 613 of file port.c.

614 {
615  return CONTAINING_RECORD(iface, upnpnat, IUPnPNAT_iface);
616 }
Definition: port.c:607
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by upnpnat_AddRef(), upnpnat_get_DynamicPortMappingCollection(), upnpnat_get_NATEventManager(), upnpnat_get_StaticPortMappingCollection(), upnpnat_GetIDsOfNames(), upnpnat_GetTypeInfo(), upnpnat_GetTypeInfoCount(), upnpnat_Invoke(), upnpnat_QueryInterface(), and upnpnat_Release().

◆ IUPnPNAT_create()

HRESULT IUPnPNAT_create ( IUnknown outer,
void **  object 
)

Definition at line 759 of file port.c.

760 {
761  upnpnat *nat;
762 
763  TRACE("(%p,%p)\n", outer, object);
764 
765  nat = heap_alloc( sizeof(*nat) );
766  if (!nat) return E_OUTOFMEMORY;
767 
768  nat->IUPnPNAT_iface.lpVtbl = &upnpnat_vtbl;
769  nat->ref = 1;
770 
771  *object = &nat->IUPnPNAT_iface;
772 
773  TRACE("returning iface %p\n", *object);
774  return S_OK;
775 }
Definition: port.c:607
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
LONG ref
Definition: port.c:610
#define S_OK
Definition: intsafe.h:59
IUPnPNAT IUPnPNAT_iface
Definition: port.c:609
static const IUPnPNATVtbl upnpnat_vtbl
Definition: port.c:744

◆ NetFwOpenPort_create()

HRESULT NetFwOpenPort_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 360 of file port.c.

361 {
362  fw_port *fp;
363 
364  TRACE("(%p,%p)\n", pUnkOuter, ppObj);
365 
366  fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
367  if (!fp) return E_OUTOFMEMORY;
368 
369  fp->INetFwOpenPort_iface.lpVtbl = &fw_port_vtbl;
370  fp->refs = 1;
371  fp->name = NULL;
373  fp->port = 0;
374 
375  *ppObj = &fp->INetFwOpenPort_iface;
376 
377  TRACE("returning iface %p\n", *ppObj);
378  return S_OK;
379 }
static const struct INetFwOpenPortVtbl fw_port_vtbl
Definition: port.c:334
Definition: port.c:37
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
BSTR name
Definition: port.c:41
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG refs
Definition: port.c:40
NET_FW_IP_PROTOCOL protocol
Definition: port.c:42
#define S_OK
Definition: intsafe.h:59
LONG port
Definition: port.c:43
INetFwOpenPort INetFwOpenPort_iface
Definition: port.c:39

Referenced by fw_ports_Item().

◆ NetFwOpenPorts_create()

HRESULT NetFwOpenPorts_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 589 of file port.c.

590 {
591  fw_ports *fp;
592 
593  TRACE("(%p,%p)\n", pUnkOuter, ppObj);
594 
595  fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
596  if (!fp) return E_OUTOFMEMORY;
597 
598  fp->INetFwOpenPorts_iface.lpVtbl = &fw_ports_vtbl;
599  fp->refs = 1;
600 
601  *ppObj = &fp->INetFwOpenPorts_iface;
602 
603  TRACE("returning iface %p\n", *ppObj);
604  return S_OK;
605 }
LONG refs
Definition: port.c:384
INetFwOpenPorts INetFwOpenPorts_iface
Definition: port.c:383
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
Definition: port.c:381
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const struct INetFwOpenPortsVtbl fw_ports_vtbl
Definition: port.c:573
#define S_OK
Definition: intsafe.h:59

Referenced by fw_profile_get_GloballyOpenPorts(), and fw_service_get_GloballyOpenPorts().

◆ upnpnat_AddRef()

static ULONG WINAPI upnpnat_AddRef ( IUPnPNAT iface)
static

Definition at line 644 of file port.c.

645 {
646  upnpnat *This = impl_from_IUPnPNAT( iface );
647  return InterlockedIncrement( &This->ref );
648 }
Definition: port.c:607
#define InterlockedIncrement
Definition: armddk.h:53
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_get_DynamicPortMappingCollection()

static HRESULT WINAPI upnpnat_get_DynamicPortMappingCollection ( IUPnPNAT iface,
IDynamicPortMappingCollection **  collection 
)
static

Definition at line 726 of file port.c.

727 {
728  upnpnat *This = impl_from_IUPnPNAT( iface );
729  FIXME("%p, %p\n", This, collection);
730  if(collection)
731  *collection = NULL;
732  return E_NOTIMPL;
733 }
Definition: port.c:607
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static ICollection collection
Definition: typelib.c:184
#define E_NOTIMPL
Definition: ddrawi.h:99
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_get_NATEventManager()

static HRESULT WINAPI upnpnat_get_NATEventManager ( IUPnPNAT iface,
INATEventManager **  manager 
)
static

Definition at line 735 of file port.c.

736 {
737  upnpnat *This = impl_from_IUPnPNAT( iface );
738  FIXME("%p, %p\n", This, manager);
739  if(manager)
740  *manager = NULL;
741  return E_NOTIMPL;
742 }
Definition: port.c:607
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_get_StaticPortMappingCollection()

static HRESULT WINAPI upnpnat_get_StaticPortMappingCollection ( IUPnPNAT iface,
IStaticPortMappingCollection **  collection 
)
static

Definition at line 717 of file port.c.

718 {
719  upnpnat *This = impl_from_IUPnPNAT( iface );
720  FIXME("%p, %p\n", This, collection);
721  if(collection)
722  *collection = NULL;
723  return E_NOTIMPL;
724 }
Definition: port.c:607
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static ICollection collection
Definition: typelib.c:184
#define E_NOTIMPL
Definition: ddrawi.h:99
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_GetIDsOfNames()

static HRESULT WINAPI upnpnat_GetIDsOfNames ( IUPnPNAT iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 678 of file port.c.

680 {
681  upnpnat *This = impl_from_IUPnPNAT( iface );
683  HRESULT hr;
684 
685  TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
686 
688  if (SUCCEEDED(hr))
689  {
690  hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
691  ITypeInfo_Release( typeinfo );
692  }
693  return hr;
694 }
Definition: port.c:607
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ upnpnat_GetTypeInfo()

static HRESULT WINAPI upnpnat_GetTypeInfo ( IUPnPNAT iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 670 of file port.c.

671 {
672  upnpnat *This = impl_from_IUPnPNAT( iface );
673 
674  TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
675  return get_typeinfo( IUPnPNAT_tid, ppTInfo );
676 }
Definition: port.c:607
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_GetTypeInfoCount()

static HRESULT WINAPI upnpnat_GetTypeInfoCount ( IUPnPNAT iface,
UINT pctinfo 
)
static

Definition at line 661 of file port.c.

662 {
663  upnpnat *This = impl_from_IUPnPNAT( iface );
664 
665  TRACE("%p %p\n", This, pctinfo);
666  *pctinfo = 1;
667  return S_OK;
668 }
Definition: port.c:607
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_Invoke()

static HRESULT WINAPI upnpnat_Invoke ( IUPnPNAT iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 696 of file port.c.

699 {
700  upnpnat *This = impl_from_IUPnPNAT( iface );
702  HRESULT hr;
703 
704  TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
705  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
706 
708  if (SUCCEEDED(hr))
709  {
710  hr = ITypeInfo_Invoke( typeinfo, &This->IUPnPNAT_iface, dispIdMember,
711  wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
712  ITypeInfo_Release( typeinfo );
713  }
714  return hr;
715 }
Definition: port.c:607
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ upnpnat_QueryInterface()

static HRESULT WINAPI upnpnat_QueryInterface ( IUPnPNAT iface,
REFIID  riid,
void **  object 
)
static

Definition at line 618 of file port.c.

619 {
620  upnpnat *This = impl_from_IUPnPNAT( iface );
621 
622  TRACE("%p %s %p\n", This, debugstr_guid( riid ), object );
623 
624  if ( IsEqualGUID( riid, &IID_IUPnPNAT ) ||
627  {
628  *object = iface;
629  }
631  {
632  TRACE("IProvideClassInfo not supported.\n");
633  return E_NOINTERFACE;
634  }
635  else
636  {
637  FIXME("interface %s not implemented\n", debugstr_guid(riid));
638  return E_NOINTERFACE;
639  }
640  IUPnPNAT_AddRef( iface );
641  return S_OK;
642 }
Definition: port.c:607
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IProvideClassInfo
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613

◆ upnpnat_Release()

static ULONG WINAPI upnpnat_Release ( IUPnPNAT iface)
static

Definition at line 650 of file port.c.

651 {
652  upnpnat *This = impl_from_IUPnPNAT( iface );
653  LONG refs = InterlockedDecrement( &This->ref );
654  if (!refs)
655  {
656  heap_free( This );
657  }
658  return refs;
659 }
Definition: port.c:607
long LONG
Definition: pedump.c:60
#define InterlockedDecrement
Definition: armddk.h:52
static upnpnat * impl_from_IUPnPNAT(IUPnPNAT *iface)
Definition: port.c:613
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( hnetcfg  )

Variable Documentation

◆ fw_port_vtbl

const struct INetFwOpenPortVtbl fw_port_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI fw_port_Release(INetFwOpenPort *iface)
Definition: port.c:58
static HRESULT WINAPI fw_port_put_IpVersion(INetFwOpenPort *iface, NET_FW_IP_VERSION ipVersion)
Definition: port.c:206
static HRESULT WINAPI fw_port_put_Enabled(INetFwOpenPort *iface, VARIANT_BOOL enabled)
Definition: port.c:314
static HRESULT WINAPI fw_port_QueryInterface(INetFwOpenPort *iface, REFIID riid, void **ppvObject)
Definition: port.c:72
static HRESULT WINAPI fw_port_get_IpVersion(INetFwOpenPort *iface, NET_FW_IP_VERSION *ipVersion)
Definition: port.c:196
static HRESULT WINAPI fw_port_put_Name(INetFwOpenPort *iface, BSTR name)
Definition: port.c:180
static HRESULT WINAPI fw_port_GetIDsOfNames(INetFwOpenPort *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: port.c:119
static HRESULT WINAPI fw_port_put_Protocol(INetFwOpenPort *iface, NET_FW_IP_PROTOCOL ipProtocol)
Definition: port.c:226
static HRESULT WINAPI fw_port_get_Protocol(INetFwOpenPort *iface, NET_FW_IP_PROTOCOL *ipProtocol)
Definition: port.c:216
static HRESULT WINAPI fw_port_get_Port(INetFwOpenPort *iface, LONG *portNumber)
Definition: port.c:241
static HRESULT WINAPI fw_port_get_Scope(INetFwOpenPort *iface, NET_FW_SCOPE *scope)
Definition: port.c:262
static HRESULT WINAPI fw_port_Invoke(INetFwOpenPort *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: port.c:142
static HRESULT WINAPI fw_port_GetTypeInfo(INetFwOpenPort *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: port.c:107
static HRESULT WINAPI fw_port_get_Enabled(INetFwOpenPort *iface, VARIANT_BOOL *enabled)
Definition: port.c:302
static HRESULT WINAPI fw_port_get_BuiltIn(INetFwOpenPort *iface, VARIANT_BOOL *builtIn)
Definition: port.c:324
static HRESULT WINAPI fw_port_get_RemoteAddresses(INetFwOpenPort *iface, BSTR *remoteAddrs)
Definition: port.c:282
static HRESULT WINAPI fw_port_GetTypeInfoCount(INetFwOpenPort *iface, UINT *pctinfo)
Definition: port.c:96
static HRESULT WINAPI fw_port_put_Port(INetFwOpenPort *iface, LONG portNumber)
Definition: port.c:251
static ULONG WINAPI fw_port_AddRef(INetFwOpenPort *iface)
Definition: port.c:51
static HRESULT WINAPI fw_port_get_Name(INetFwOpenPort *iface, BSTR *name)
Definition: port.c:170
static HRESULT WINAPI fw_port_put_Scope(INetFwOpenPort *iface, NET_FW_SCOPE scope)
Definition: port.c:272
static HRESULT WINAPI fw_port_put_RemoteAddresses(INetFwOpenPort *iface, BSTR remoteAddrs)
Definition: port.c:292

Definition at line 334 of file port.c.

Referenced by NetFwOpenPort_create().

◆ fw_ports_vtbl

const struct INetFwOpenPortsVtbl fw_ports_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI fw_ports_Invoke(INetFwOpenPorts *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: port.c:482
static HRESULT WINAPI fw_ports_get__NewEnum(INetFwOpenPorts *iface, IUnknown **newEnum)
Definition: port.c:563
static HRESULT WINAPI fw_ports_QueryInterface(INetFwOpenPorts *iface, REFIID riid, void **ppvObject)
Definition: port.c:412
static HRESULT WINAPI fw_ports_Add(INetFwOpenPorts *iface, INetFwOpenPort *port)
Definition: port.c:522
static ULONG WINAPI fw_ports_AddRef(INetFwOpenPorts *iface)
Definition: port.c:392
static HRESULT WINAPI fw_ports_GetTypeInfo(INetFwOpenPorts *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: port.c:447
static HRESULT WINAPI fw_ports_GetTypeInfoCount(INetFwOpenPorts *iface, UINT *pctinfo)
Definition: port.c:436
static HRESULT WINAPI fw_ports_Item(INetFwOpenPorts *iface, LONG portNumber, NET_FW_IP_PROTOCOL ipProtocol, INetFwOpenPort **openPort)
Definition: port.c:543
static HRESULT WINAPI fw_ports_get_Count(INetFwOpenPorts *iface, LONG *count)
Definition: port.c:510
static HRESULT WINAPI fw_ports_Remove(INetFwOpenPorts *iface, LONG portNumber, NET_FW_IP_PROTOCOL ipProtocol)
Definition: port.c:532
static ULONG WINAPI fw_ports_Release(INetFwOpenPorts *iface)
Definition: port.c:399
static HRESULT WINAPI fw_ports_GetIDsOfNames(INetFwOpenPorts *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: port.c:459

Definition at line 573 of file port.c.

Referenced by NetFwOpenPorts_create().

◆ upnpnat_vtbl

const IUPnPNATVtbl upnpnat_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI upnpnat_get_DynamicPortMappingCollection(IUPnPNAT *iface, IDynamicPortMappingCollection **collection)
Definition: port.c:726
static HRESULT WINAPI upnpnat_Invoke(IUPnPNAT *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: port.c:696
static HRESULT WINAPI upnpnat_GetTypeInfo(IUPnPNAT *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: port.c:670
static HRESULT WINAPI upnpnat_get_StaticPortMappingCollection(IUPnPNAT *iface, IStaticPortMappingCollection **collection)
Definition: port.c:717
static HRESULT WINAPI upnpnat_QueryInterface(IUPnPNAT *iface, REFIID riid, void **object)
Definition: port.c:618
static ULONG WINAPI upnpnat_Release(IUPnPNAT *iface)
Definition: port.c:650
static HRESULT WINAPI upnpnat_GetTypeInfoCount(IUPnPNAT *iface, UINT *pctinfo)
Definition: port.c:661
static ULONG WINAPI upnpnat_AddRef(IUPnPNAT *iface)
Definition: port.c:644
static HRESULT WINAPI upnpnat_GetIDsOfNames(IUPnPNAT *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: port.c:678
static HRESULT WINAPI upnpnat_get_NATEventManager(IUPnPNAT *iface, INATEventManager **manager)
Definition: port.c:735

Definition at line 744 of file port.c.

Referenced by IUPnPNAT_create().