Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than mpr, prefix the name with the module name and a period.
VVNetAddConnection2 (mpr)
.
C# Signature:
[StructLayout(LayoutKind.Sequential)]
[DllImport("mpr.dll", SetLastError=true)]
static extern TODO VVNetAddConnection2(TODO);
VB Signature:
Declare Function VVNetAddConnection2 Lib "mpr.dll" (TODO) As TODO
User-Defined Types:
None.
private class NETRESOURCE
{
public ResourceScope dwScope = 0;
public ResourceType dwType = 0;
public ResourceDisplayType dwDisplayType = 0;
public ResourceUsage dwUsage = 0;
[MarshalAs(UnmanagedType.LPStr)] public string lpLocalName = null;
[MarshalAs(UnmanagedType.LPStr)] public string lpRemoteName = null;
[MarshalAs(UnmanagedType.LPStr)] public string lpComment = null;
[MarshalAs(UnmanagedType.LPStr)] public string lpProvider;
};
public enum ResourceScope
{
RESOURCE_CONNECTED = 1,
RESOURCE_GLOBALNET,
RESOURCE_REMEMBERED,
RESOURCE_RECENT,
RESOURCE_CONTEXT
};
Alternative Managed API:
Do you know one? Please contribute it!
public enum ResourceType
{
RESOURCETYPE_ANY,
RESOURCETYPE_DISK,
RESOURCETYPE_PRINT,
RESOURCETYPE_RESERVED
};
int result = WNetAddConnection2(nr, password, user, (int)ResourceConnection.CONNECT_TEMPORARY);
Please add some!
The WNetAddConnection2 function makes a connection to a network resource. The function can redirect a local device to the network resource.
9/5/2012 10:52:40 PM - -78.237.25.102
Click to read this page
4/6/2008 7:23:14 AM - anonymous
The type of resource. This member can be one of the following values defined in the Winnetwk.h header file.
10/13/2016 2:32:15 AM - -91.90.10.220
The display options for the network object in a network browsing user interface. This member can be one of the following values defined in the Winnetwk.h header file.
10/13/2016 2:31:47 AM - -98.203.228.160
Click to read this page
10/13/2016 2:28:10 AM - -74.46.16.13
A set of bit flags describing how the resource can be used.Note that this member can be specified only if the dwScope member is equal to RESOURCE_GLOBALNET. This member can be one of the following values defined in the Winnetwk.h header file.
10/13/2016 2:34:22 AM - -91.90.10.220
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).