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 netapi32, prefix the name with the module name and a period.
NetUseEnum (netapi32)
.
C# Signature:
[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
internal static extern NET_API_STATUS NetUseEnum(
LPWSTR UncServerName,
DWORD Level,
ref IntPtr Buf,
DWORD PreferedMaximumSize,
out int EntriesRead,
out int TotalEntries,
IntPtr resumeHandle);
VB Signature:
Declare Function NetUseEnum Lib "netapi32.dll" (TODO) As TODO
// now step through all network shares and check if we have already a connection to the server
int li=0;
USE_INFO_2 lInfo;
while(li<lRead)
{
lInfo=(USE_INFO_2)Marshal.PtrToStructure(new IntPtr(lBuffer.ToInt32()+(Marshal.SizeOf(typeof(USE_INFO_2))*li)),typeof(USE_INFO_2));
if (lInfo.ui2_remote.StartsWith(lUNCPath))
{
lBack=true;
break;
}
++li;
}
NetApiBufferFree(lBuffer);
NetUseEnum - The NetUseEnum function lists all current connections between the local computer and resources on remote servers.
3/13/2017 8:20:28 AM - -212.4.138.50
NetUseEnum - The NetUseEnum function lists all current connections between the local computer and resources on remote servers.
3/13/2017 8:20:28 AM - -212.4.138.50
The NetUseAdd function establishes a connection between the local computer and a remote server. You can specify a local drive letter or a printer device to connect. If you do not specify a local drive letter or printer device, the function authenticates the client with the server for future connections.
5/8/2009 2:10:37 PM - Christian Rodemeyer-84.152.7.204
Frees the memory allocated by network management functions.
6/21/2016 8:26:32 AM - -63.226.251.37
NetUseEnum - The NetUseEnum function lists all current connections between the local computer and resources on remote servers.
3/13/2017 8:20:28 AM - -212.4.138.50
NetUseEnum - The NetUseEnum function lists all current connections between the local computer and resources on remote servers.
3/13/2017 8:20:28 AM - -212.4.138.50
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).