WNetOpenEnum (mpr)
Last changed: -74.46.16.13

.

WNetOpenEnum

C# Signature:

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

User-Defined Types:

[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;

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

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

    /** 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;

    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