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
Download Visual Studio Add-In

Search Results for "WNetCancelConnection" in [All]

mpr

.

    WNetCancelConnection2(_networkName, 0, true);

.

    private static extern int WNetCancelConnection2(string name, int flags,

.
Summary
The WNetCancelConnection2 function cancels an existing network connection. You can also call the function to remove remembered network connections that are not currently connected.
.

static extern int WNetCancelConnection2(string lpName, Int32 dwFlags, bool bForce);

.

Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" (ByVal lpName As String, ByVal dwFlags As Integer, ByVal fForce As Integer) As Integer

.

    ''' The WNetCancelConnection2 function cancels an existing network connection.

.

    Private Shared Function WNetCancelConnection2(ByVal lpName As String, _

.

public static extern int WNetCancelConnection2(string lpName, Int32 dwFlags, bool fForce);

.

int result=WNetCancelConnection2("Y:", CONNECT_UPDATE_PROFILE, true);

.
Documentation
[WNetCancelConnection2] on MSDN
.
Summary
The WNetCancelConnection2 function cancels an existing network connection. You can also call the function to remove remembered network connections that are not currently connected.
.

static extern int WNetCancelConnection2(string lpName, Int32 dwFlags, bool bForce);

.

Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" (ByVal lpName As String, ByVal dwFlags As Long, ByVal fForce As Long) As Long

.

    ''' The WNetCancelConnection2 function cancels an existing network connection.

.

    Private Shared Function WNetCancelConnection2(ByVal lpName As String, _

.

public static extern int WNetCancelConnection2(string lpName, Int32 dwFlags, bool fForce);

.

int result=WNetCancelConnection2("Y:", CONNECT_UPDATE_PROFILE, true);

.
Documentation
[WNetCancelConnection2] on MSDN

netapi32

.

You can also use the WNetCancelConnection2 function to terminate a network connection.


 
Access PInvoke.net directly from VS: