Top Description Inners Fields Constructors Methods
com.sun.jna.platform.win32

public abstract Class Winnetwk

extends Object
Class Inheritance
Imports
java.util.List, com.sun.jna.Pointer, .Structure, .Structure.FieldOrder, com.sun.jna.win32.W32APITypeMapper

Ported from AccCtrl.h. Microsoft Windows SDK 7.1
Author
amarcionek[at]gmail.com

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class
Winnetwk.ConnectFlag

A set of bit flags describing how the resource can be used.

public static class
Winnetwk.NETRESOURCE

The NETRESOURCE structure contains information about a network resource.

public static class
Winnetwk.REMOTE_NAME_INFO

The REMOTE_NAME_INFO structure contains path and name information for a network resource.

public class
Winnetwk.RESOURCEDISPLAYTYPE

The type of resource.

public class
Winnetwk.RESOURCESCOPE

The scope of the enumeration.

public class
Winnetwk.RESOURCETYPE

The type of resource.

public class
Winnetwk.RESOURCEUSAGE

A set of bit flags describing how the resource can be used.

public static class
Winnetwk.UNIVERSAL_NAME_INFO

The UNIVERSAL_NAME_INFO structure contains a pointer to a Universal Naming Convention (UNC) name string for a network resource.

Field Summary

Modifier and TypeField and Description
public static int
public static int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

REMOTE_NAME_INFO_LEVELback to summary
public static int REMOTE_NAME_INFO_LEVEL
UNIVERSAL_NAME_INFO_LEVELback to summary
public static int UNIVERSAL_NAME_INFO_LEVEL

Constructor Detail

Winnetwkback to summary
public Winnetwk()
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.ConnectFlag

extends Object
Class Inheritance

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.

Note

This are for the dwUsage member of NetResource

Field Summary

Modifier and TypeField and Description
public static final int
CONNECT_CMD_SAVECRED

If this flag is set, and the operating system prompts for a credential, the credential should be saved by the credential manager.

public static final int
CONNECT_COMMANDLINE

If this flag is set, the operating system prompts the user for authentication using the command line instead of a graphical user interface (GUI).

public static final int
CONNECT_INTERACTIVE

If this flag is set, the operating system may interact with the user for authentication purposes.

public static final int
CONNECT_LOCALDRIVE

If this flag is set, the connection was made using a local device redirection.

public static final int
CONNECT_PROMPT

This flag instructs the system not to use any default settings for user names or passwords without offering the user the opportunity to supply an alternative.

public static final int
CONNECT_REDIRECT

This flag forces the redirection of a local device when making the connection.

public static final int
CONNECT_UPDATE_PROFILE

This flag instructs the operating system to store the network resource connection.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONNECT_CMD_SAVECREDback to summary
public static final int CONNECT_CMD_SAVECRED

If this flag is set, and the operating system prompts for a credential, the credential should be saved by the credential manager. If the credential manager is disabled for the caller's logon session, or if the network provider does not support saving credentials, this flag is ignored. This flag is also ignored unless you set the CONNECT_COMMANDLINE flag. Windows 2000/NT and Windows Me/98/95: This value is not supported.

CONNECT_COMMANDLINEback to summary
public static final int CONNECT_COMMANDLINE

If this flag is set, the operating system prompts the user for authentication using the command line instead of a graphical user interface (GUI). This flag is ignored unless CONNECT_INTERACTIVE is also set. Windows 2000/NT and Windows Me/98/95: This value is not supported.

CONNECT_INTERACTIVEback to summary
public static final int CONNECT_INTERACTIVE

If this flag is set, the operating system may interact with the user for authentication purposes.

CONNECT_LOCALDRIVEback to summary
public static final int CONNECT_LOCALDRIVE

If this flag is set, the connection was made using a local device redirection. If the lpAccessName parameter points to a buffer, the local device name is copied to the buffer.

CONNECT_PROMPTback to summary
public static final int CONNECT_PROMPT

This flag instructs the system not to use any default settings for user names or passwords without offering the user the opportunity to supply an alternative. This flag is ignored unless CONNECT_INTERACTIVE is also set.

CONNECT_REDIRECTback to summary
public static final int CONNECT_REDIRECT

This flag forces the redirection of a local device when making the connection. If the lpLocalName member of NETRESOURCE specifies a local device to redirect, this flag has no effect, because the operating system still attempts to redirect the specified device. When the operating system automatically chooses a local device, the dwType member must not be equal to RESOURCETYPE_ANY. If this flag is not set, a local device is automatically chosen for redirection only if the network requires a local device to be redirected. Windows XP: When the system automatically assigns network drive letters, letters are assigned beginning with Z:, then Y:, and ending with C:. This reduces collision between per-logon drive letters (such as network drive letters) and global drive letters (such as disk drives). Note that previous releases assigned drive letters beginning with C: and ending with Z:.

CONNECT_UPDATE_PROFILEback to summary
public static final int CONNECT_UPDATE_PROFILE

This flag instructs the operating system to store the network resource connection. If this bit flag is set, the operating system automatically attempts to restore the connection when the user logs on. The system remembers only successful connections that redirect local devices. It does not remember connections that are unsuccessful or deviceless connections. (A deviceless connection occurs when lpLocalName is NULL or when it points to an empty string.) If this bit flag is clear, the operating system does not automatically restore the connection at logon.

Constructor Detail

ConnectFlagback to summary
public ConnectFlag()
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.NETRESOURCE

extends Structure
Class Inheritance
Known Direct Subclasses
com.sun.jna.platform.win32.Winnetwk.NETRESOURCE.ByReference
Annotations
@FieldOrder:dwScope, dwType, dwDisplayType, dwUsage, lpLocalName, lpRemoteName, lpComment, lpProvider

The NETRESOURCE structure contains information about a network resource.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public int
dwDisplayType

The display options for the network object in a network browsing user interface.

public int
dwScope

The scope of the enumeration.

public int
dwType

The type of resource.

public int
dwUsage

A set of bit flags describing how the resource can be used.

public String
lpComment

A pointer to a NULL-terminated string that contains a comment supplied by the network provider.

public String
lpLocalName

If the dwScope member is equal to RESOURCE_CONNECTED or RESOURCE_REMEMBERED, this member is a pointer to a null-terminated character string that specifies the name of a local device.

public String
lpProvider

A pointer to a NULL-terminated string that contains the name of the provider that owns the resource.

public String
lpRemoteName

If the entry is a network resource, this member is a pointer to a null-terminated character string that specifies the remote network name.

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringtoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

dwDisplayTypeback to summary
public int dwDisplayType

The display options for the network object in a network browsing user interface. This member can be one of the values defined in the NetResourceDisplayType.

dwScopeback to summary
public int dwScope

The scope of the enumeration. This member can be one of the values defined in class NetResourceSope.

dwTypeback to summary
public int dwType

The type of resource. This member can be one of first 3 values defined in the NetResourceType.

dwUsageback to summary
public int dwUsage

A set of bit flags describing how the resource can be used.

lpCommentback to summary
public String lpComment

A pointer to a NULL-terminated string that contains a comment supplied by the network provider.

lpLocalNameback to summary
public String lpLocalName

If the dwScope member is equal to RESOURCE_CONNECTED or RESOURCE_REMEMBERED, this member is a pointer to a null-terminated character string that specifies the name of a local device. This member is NULL if the connection does not use a device.

lpProviderback to summary
public String lpProvider

A pointer to a NULL-terminated string that contains the name of the provider that owns the resource. This member can be NULL if the provider name is unknown. To retrieve the provider name, you can call the WNetGetProviderName function.

lpRemoteNameback to summary
public String lpRemoteName

If the entry is a network resource, this member is a pointer to a null-terminated character string that specifies the remote network name. If the entry is a current or persistent connection, lpRemoteName member points to the network name associated with the name pointed to by the lpLocalName member. The string can be MAX_PATH characters in length, and it must follow the network provider's naming conventions

Constructor Detail

NETRESOURCEback to summary
public NETRESOURCE()
NETRESOURCEback to summary
public NETRESOURCE(Pointer address)
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.NETRESOURCE.ByReference

extends NETRESOURCE
implements ByReference
Class Inheritance
All Implemented Interfaces
com.sun.jna.Structure.ByReference

Constructor Summary

AccessConstructor and Description
public
public

Constructor Detail

ByReferenceback to summary
public ByReference()
ByReferenceback to summary
public ByReference(Pointer memory)
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.REMOTE_NAME_INFO

extends Structure
Class Inheritance
Known Direct Subclasses
com.sun.jna.platform.win32.Winnetwk.REMOTE_NAME_INFO.ByReference, com.sun.jna.platform.win32.Winnetwk.UNIVERSAL_NAME_INFO.ByReference
Annotations
@FieldOrder:lpUniversalName, lpConnectionName, lpRemainingPath

The REMOTE_NAME_INFO structure contains path and name information for a network resource. The structure contains a member that points to a Universal Naming Convention (UNC) name string for the resource, and two members that point to additional network connection information strings.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public String
lpConnectionName

Pointer to a null-terminated string that is the name of a network connection.

public String
lpRemainingPath

Pointer to a null-terminated name string.

public String
lpUniversalName

Pointer to the null-terminated UNC name string that identifies a network resource.

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringtoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

lpConnectionNameback to summary
public String lpConnectionName

Pointer to a null-terminated string that is the name of a network connection.

lpRemainingPathback to summary
public String lpRemainingPath

Pointer to a null-terminated name string.

lpUniversalNameback to summary
public String lpUniversalName

Pointer to the null-terminated UNC name string that identifies a network resource.

Constructor Detail

REMOTE_NAME_INFOback to summary
public REMOTE_NAME_INFO()
REMOTE_NAME_INFOback to summary
public REMOTE_NAME_INFO(Pointer address)
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.REMOTE_NAME_INFO.ByReference

extends REMOTE_NAME_INFO
implements ByReference
Class Inheritance
All Implemented Interfaces
com.sun.jna.Structure.ByReference

Constructor Summary

AccessConstructor and Description
public
public

Constructor Detail

ByReferenceback to summary
public ByReference()
ByReferenceback to summary
public ByReference(Pointer memory)
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.RESOURCEDISPLAYTYPE

extends Object
Class Inheritance

The type of resource. This member can be one of the following values defined in the Winnetwk.h header file.

Note

This are for the dwScope member of NetResource

Field Summary

Modifier and TypeField and Description
public static final int
RESOURCEDISPLAYTYPE_DOMAIN

The object should be displayed as a domain.

public static final int
RESOURCEDISPLAYTYPE_FILE

The object should be displayed as a file.

public static final int
RESOURCEDISPLAYTYPE_GENERIC

The method used to display the object does not matter.

public static final int
RESOURCEDISPLAYTYPE_SERVER

The object should be displayed as a server.

public static final int
RESOURCEDISPLAYTYPE_SHARE

The object should be displayed as a share.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RESOURCEDISPLAYTYPE_DOMAINback to summary
public static final int RESOURCEDISPLAYTYPE_DOMAIN

The object should be displayed as a domain.

RESOURCEDISPLAYTYPE_FILEback to summary
public static final int RESOURCEDISPLAYTYPE_FILE

The object should be displayed as a file.

RESOURCEDISPLAYTYPE_GENERICback to summary
public static final int RESOURCEDISPLAYTYPE_GENERIC

The method used to display the object does not matter.

RESOURCEDISPLAYTYPE_SERVERback to summary
public static final int RESOURCEDISPLAYTYPE_SERVER

The object should be displayed as a server.

RESOURCEDISPLAYTYPE_SHAREback to summary
public static final int RESOURCEDISPLAYTYPE_SHARE

The object should be displayed as a share.

Constructor Detail

RESOURCEDISPLAYTYPEback to summary
public RESOURCEDISPLAYTYPE()
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.RESOURCESCOPE

extends Object
Class Inheritance

The scope of the enumeration. This member can be one of the following values defined in the Winnetwk.h header file.

Note

This are for the dwScope member of NetResource.

Note

Certain functions allow different values of the scope parameter. Consult MSDN for more info.

Field Summary

Modifier and TypeField and Description
public static final int
RESOURCE_CONNECTED

Enumerate currently connected resources.

public static final int
RESOURCE_CONTEXT

Enumerate only resources in the network context of the caller.

public static final int
RESOURCE_GLOBALNET

Enumerate all resources on the network.

public static final int
RESOURCE_RECENT

Note

Definition for this is not defined in Windows Kits nor on MSDN

public static final int
RESOURCE_REMEMBERED

Enumerate remembered (persistent) connections.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RESOURCE_CONNECTEDback to summary
public static final int RESOURCE_CONNECTED

Enumerate currently connected resources. The dwUsage member cannot be specified.

RESOURCE_CONTEXTback to summary
public static final int RESOURCE_CONTEXT

Enumerate only resources in the network context of the caller. Specify this value for a Network Neighborhood view. The function ignores the dwUsage parameter.

RESOURCE_GLOBALNETback to summary
public static final int RESOURCE_GLOBALNET

Enumerate all resources on the network. The dwUsage member is specified.

RESOURCE_RECENTback to summary
public static final int RESOURCE_RECENT

Note

Definition for this is not defined in Windows Kits nor on MSDN

RESOURCE_REMEMBEREDback to summary
public static final int RESOURCE_REMEMBERED

Enumerate remembered (persistent) connections. The dwUsage member cannot be specified.

Constructor Detail

RESOURCESCOPEback to summary
public RESOURCESCOPE()
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.RESOURCETYPE

extends Object
Class Inheritance

The type of resource. This member can be one of the following values defined in the Winnetwk.h header file.

Note

This are for the dwType member of NetResource

Field Summary

Modifier and TypeField and Description
public static final int
RESOURCETYPE_ANY

All resources

public static final int
RESOURCETYPE_DISK

Disk resources

public static final int
RESOURCETYPE_PRINT

Print resources

public static final int
RESOURCETYPE_RESERVED

Note

Definition for this is not defined in Windows Kits nor on MSDN

public static final int
RESOURCETYPE_UNKNOWN

The WNetEnumResource function can also return the value RESOURCETYPE_UNKNOWN if a resource is neither a disk nor a print resource.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RESOURCETYPE_ANYback to summary
public static final int RESOURCETYPE_ANY

All resources

RESOURCETYPE_DISKback to summary
public static final int RESOURCETYPE_DISK

Disk resources

RESOURCETYPE_PRINTback to summary
public static final int RESOURCETYPE_PRINT

Print resources

RESOURCETYPE_RESERVEDback to summary
public static final int RESOURCETYPE_RESERVED

Note

Definition for this is not defined in Windows Kits nor on MSDN

RESOURCETYPE_UNKNOWNback to summary
public static final int RESOURCETYPE_UNKNOWN

The WNetEnumResource function can also return the value RESOURCETYPE_UNKNOWN if a resource is neither a disk nor a print resource.

Constructor Detail

RESOURCETYPEback to summary
public RESOURCETYPE()
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.RESOURCEUSAGE

extends Object
Class Inheritance

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.

Note

This are for the dwUsage member of NetResource

Field Summary

Modifier and TypeField and Description
public static final int
RESOURCEUSAGE_ALL

Setting this value is equivalent to setting RESOURCEUSAGE_CONNECTABLE, RESOURCEUSAGE_CONTAINER, and RESOURCEUSAGE_ATTACHED.

public static final int
RESOURCEUSAGE_ATTACHED

The resource must be attached.

public static final int
RESOURCEUSAGE_CONNECTABLE

The resource is a connectable resource; the name pointed to by the lpRemoteName member can be passed to the WNetAddConnection function to make a network connection.

public static final int
RESOURCEUSAGE_CONTAINER

The resource is a container resource; the name pointed to by the lpRemoteName member can be passed to the WNetOpenEnum function to enumerate the resources in the container.

public static final int
RESOURCEUSAGE_NOLOCALDEVICE

The resource is not a local device.

public static final int
RESOURCEUSAGE_SIBLING

The resource is a sibling.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

RESOURCEUSAGE_ALLback to summary
public static final int RESOURCEUSAGE_ALL

Setting this value is equivalent to setting RESOURCEUSAGE_CONNECTABLE, RESOURCEUSAGE_CONTAINER, and RESOURCEUSAGE_ATTACHED.

RESOURCEUSAGE_ATTACHEDback to summary
public static final int RESOURCEUSAGE_ATTACHED

The resource must be attached. This value specifies that a function to enumerate resource this should fail if the caller is not authenticated, even if the network permits enumeration without authentication.

RESOURCEUSAGE_CONNECTABLEback to summary
public static final int RESOURCEUSAGE_CONNECTABLE

The resource is a connectable resource; the name pointed to by the lpRemoteName member can be passed to the WNetAddConnection function to make a network connection.

RESOURCEUSAGE_CONTAINERback to summary
public static final int RESOURCEUSAGE_CONTAINER

The resource is a container resource; the name pointed to by the lpRemoteName member can be passed to the WNetOpenEnum function to enumerate the resources in the container.

RESOURCEUSAGE_NOLOCALDEVICEback to summary
public static final int RESOURCEUSAGE_NOLOCALDEVICE

The resource is not a local device.

RESOURCEUSAGE_SIBLINGback to summary
public static final int RESOURCEUSAGE_SIBLING

The resource is a sibling. This value is not used by Windows.

Constructor Detail

RESOURCEUSAGEback to summary
public RESOURCEUSAGE()
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.UNIVERSAL_NAME_INFO

extends Structure
Class Inheritance
Annotations
@FieldOrder:lpUniversalName

The UNIVERSAL_NAME_INFO structure contains a pointer to a Universal Naming Convention (UNC) name string for a network resource.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public String
lpUniversalName

Pointer to the null-terminated UNC name string that identifies a network resource.

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringtoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

lpUniversalNameback to summary
public String lpUniversalName

Pointer to the null-terminated UNC name string that identifies a network resource.

Constructor Detail

UNIVERSAL_NAME_INFOback to summary
public UNIVERSAL_NAME_INFO()
UNIVERSAL_NAME_INFOback to summary
public UNIVERSAL_NAME_INFO(Pointer address)
com.sun.jna.platform.win32 back to summary

public Class Winnetwk.UNIVERSAL_NAME_INFO.ByReference

extends REMOTE_NAME_INFO
implements ByReference
Class Inheritance
All Implemented Interfaces
com.sun.jna.Structure.ByReference

Constructor Summary

AccessConstructor and Description
public
public

Constructor Detail

ByReferenceback to summary
public ByReference()
ByReferenceback to summary
public ByReference(Pointer memory)