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

WNetOpenEnum (mpr)
 
.

WNetOpenEnum

C# Signature:

[DllImport("mpr.dll")]
public static extern UInt32 WNetOpenEnum(ResourceScope dwScope, ResourceType dwType, ResourceUsage dwUsage, NetResource lpNetResource, ref IntPtr lphEnum);
public static extern UInt32 WNetOpenEnum(UInt32 dwScope, UInt32 dwType, UInt32 dwUsage, NetResource lpNetResource, ref IntPtr lphEnum);

VB.NET Signature:

<DllImport("mpr.dll")> _
Public Shared Function WNetOpenEnum(dwScope As ResourceScope, dwType As ResourceType, dwUsage As ResourceUsage, lpNetResource As NetResource, ByRef lphEnum As IntPtr) As UInteger
Public Shared Function WNetOpenEnum(dwScope As UInteger, dwType As UInteger, dwUsage As UInteger, lpNetResource As NetResource, ByRef lphEnum As IntPtr) As UInteger
End Function

User-Defined Types:

ResourceScope, ResourceType, ResourceUsage, NetResource

[StructLayout(LayoutKind.Sequential)]
public class NetResource
{
    /** Scope */
    public const UInt32 RESOURCE_CONNECTED = 0x00000001;
    public const UInt32 RESOURCE_GLOBALNET = 0x00000002;
    public const UInt32 RESOURCE_REMEMBERED = 0x00000003;

Notes:

None.

    /** Type */
    public const UInt32 RESOURCETYPE_ANY = 0x00000000;
    public const UInt32 RESOURCETYPE_DISK = 0x00000001;
    public const UInt32 RESOURCETYPE_PRINT = 0x00000002;

Tips & Tricks:

Please add some!

    /** Usage */
    public const UInt32 RESOURCEUSAGE_CONNECTABLE = 0x00000001;
    public const UInt32 RESOURCEUSAGE_CONTAINER = 0x00000002;
    public const UInt32 RESOURCEUSAGE_RESERVED = 0x80000000;

Sample Code:

Please add some!

    /** Type */
    public const UInt32 RESOURCEDISPLAYTYPE_GENERIC = 0x00000000;
    public const UInt32 RESOURCEDISPLAYTYPE_DOMAIN = 0x00000001;
    public const UInt32 RESOURCEDISPLAYTYPE_SERVER = 0x00000002;
    public const UInt32 RESOURCEDISPLAYTYPE_SHARE = 0x00000003;
    public const UInt32 RESOURCEDISPLAYTYPE_FILE = 0x00000004;
    public const UInt32 RESOURCEDISPLAYTYPE_GROUP = 0x00000005;
    public const UInt32 RESOURCEDISPLAYTYPE_TREE = 0x0000000A;

Alternative Managed API:

TODO

    public UInt32 dwScope;
    public UInt32 dwType;
    public UInt32 dwDisplayType;
    public UInt32 dwUsage;
    public string lpLocalName;
    public string lpRemoteName;
    public string lpComment;
    public string lpProvider;

}

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

TODO

Documentation

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).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions