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.

24 lines
1.3 KiB

  1. #ifndef __UPNPNAT_UTILS_H_
  2. #define __UPNPNAT_UTILS_H_
  3. #include <upnp.h>
  4. HRESULT GetNumberOfEntries (IUPnPService * pUS, ULONG * pul);
  5. HRESULT GetExternalIPAddress (IUPnPService * pUS, BSTR * pbstr);
  6. HRESULT InvokeAction (IUPnPService * pUPS, CComBSTR & bstrActionName, VARIANT pvIn, VARIANT * pvOut, VARIANT * pvRet);
  7. HRESULT AddPortMapping (IUPnPService * pUPS, BSTR bstrRemoteHost, long lExternalPort, BSTR bstrProtocol, long lInternalPort, BSTR bstrInternalClient, VARIANT_BOOL vbEnabled, BSTR bstrDescription, long lLeaseDurationDesired);
  8. HRESULT DeletePortMapping (IUPnPService * pUPS, BSTR bstrRemoteHost, long lExternalPort, BSTR bstrProtocol);
  9. HRESULT GetOnlyVariantElementFromVariantSafeArray (VARIANT * pvSA, VARIANT * pv);
  10. HRESULT AddToSafeArray (SAFEARRAY * psa, VARIANT * pv, long lIndex);
  11. HRESULT GetBSTRFromSafeArray (SAFEARRAY * psa, BSTR * pbstr, long lIndex);
  12. HRESULT GetLongFromSafeArray (SAFEARRAY * psa, long * pl, long lIndex);
  13. HRESULT GetBoolFromSafeArray (SAFEARRAY * psa, VARIANT_BOOL * pvb, long lIndex);
  14. NETCON_MEDIATYPE GetMediaType (INetConnection * pNC);
  15. //HRESULT GetOnlyChildDevice (IUPnPDevice * pParent, IUPnPDevice ** ppChild);
  16. //HRESULT FindDeviceByType (IUPnPDevices * pUPDs, BSTR bstrType, IUPnPDevice ** ppUPD);
  17. #endif //__UPNPNAT_UTILS_H_