Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "EnableRouter" in [All]

iphlpapi

.
Summary
The EnableRouter function turns on IPv4 forwarding on the local computer. EnableRouter also increments a reference count that tracks the number of requests to enable IPv4 forwarding.
.

static extern int EnableRouter(IntPtr pHandle, ref System.Threading.NativeOverlapped pOverlapped);

.

    Public Shared Function EnableRouter(pHandle As IntPtr, ByRef pOverlapped As OVERLAPPED) As Integer

.

    Public Shared Function EnableRouter(pHandle As IntPtr, ByRef pOverlapped As OVERLAPPED) As Integer

.

    Private pOverlapped As OVERLAPPED ' <- Important! This should also be used when calling UnenableRouter() API Function.

.

    pOverlapped.hEvent = CreateEvent(IntPtr.Zero, False, False, "enablerouter")

.

    Dim RetVal As Integer = EnableRouter(IntPtr.Zero, pOverlapped)

.
Documentation
[EnableRouter] on MSDN
.
Summary
The UnenableRouter function decrements the reference count that tracks the number of requests to enable IPv4 forwarding. When this reference count reaches zero, UnenableRouter turns off IPv4 forwarding on the local computer.
.

static extern int UnenableRouter(ref System.Threading.NativeOverlapped pOverlapped, IntPtr lpdwEnableCount);

.

    Public Shared Function UnenableRouter(pOverlapped As IntPtr, ByRef lpdwEnableCount As Long) As Integer

.

    Public Shared Function UnenableRouter(pOverlapped As IntPtr, ByRef lpdwEnableCount As Long) As Integer

.

    Private pOverlapped As OVERLAPPED <- Important! Created from EnableRouter() call.

.

        RetVal = UnenableRouter(pOverlappedPtr, count)

.
Documentation
[UnenableRouter] on MSDN

 
Access PInvoke.net directly from VS: