IpHlpApiSetIpStatistics Method
Toggles IP forwarding on or off and sets the default time-to-live (TTL) value for the local computer.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("IpHlpApi.dll", ExactSpelling = true)]
public static Win32ErrorCode SetIpStatistics(
ref IpStats refIpStats
)
<DllImportAttribute("IpHlpApi.dll", ExactSpelling := true>]
Public Shared Function SetIpStatistics (
ByRef refIpStats As IpStats
) As Win32ErrorCode
Dim refIpStats As IpStats
Dim returnValue As Win32ErrorCode
returnValue = IpHlpApi.SetIpStatistics(refIpStats)
public:
[DllImportAttribute(L"IpHlpApi.dll", ExactSpelling = true)]
static Win32ErrorCode SetIpStatistics(
IpStats% refIpStats
)
[<DllImportAttribute("IpHlpApi.dll", ExactSpelling = true)>]
static member SetIpStatistics :
refIpStats : IpStats byref -> Win32ErrorCode
No code example is currently available or this language may not be supported.
- refIpStats IpStats
-
A IpStats structure.
The caller should set the Forwarding and DefaultTTL members
of this structure to the new values.
To keep one of the members at its current value, use MIB_USE_CURRENT_TTL
or UseCurrentForwarding.
Win32ErrorCode
If this function succeeds, it returns
ERROR_SUCCESS.
Otherwise, it returns an
Win32ErrorCode error code.