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

public Interface Cfgmgr32

extends Library
Imports
com.sun.jna.Library, .Native, .Pointer, com.sun.jna.ptr.IntByReference, com.sun.jna.win32.W32APIOptions

Windows Cfgmgr32.
Author
widdis[at]gmail[dot]com

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final Cfgmgr32
public static final int
Inherited from com.sun.jna.Library:
OPTION_ALLOW_OBJECTSOPTION_CALLING_CONVENTIONOPTION_CLASSLOADEROPTION_FUNCTION_MAPPEROPTION_INVOCATION_MAPPEROPTION_OPEN_FLAGSOPTION_STRING_ENCODINGOPTION_STRUCTURE_ALIGNMENTOPTION_SYMBOL_PROVIDEROPTION_TYPE_MAPPER

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
CM_Get_Child
(IntByReference
Caller-supplied pointer to the device instance handle to the child node that this function retrieves. The retrieved handle is bound to the local machine.
pdnDevInst
,
int
Caller-supplied device instance handle that is bound to the local machine.
dnDevInst
,
int
Not used, must be zero.
ulFlags
)

The CM_Get_Child function is used to retrieve a device instance handle to the first child node of a specified device node (devnode) in the local machine's device tree.

public int

Returns:

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
CM_Get_Device_ID
(int
Caller-supplied device instance handle that is bound to the local machine.
devInst
,
Pointer
Address of a buffer to receive a device instance ID string. The required buffer size can be obtained by calling CM_Get_Device_ID_Size, then incrementing the received value to allow room for the string's terminating NULL.
Buffer
,
int
Caller-supplied length, in characters, of the buffer specified by Buffer.
BufferLen
,
int
Not used, must be zero.
ulFlags
)

The CM_Get_Device_ID function retrieves the device instance ID for a specified device instance on the local machine.

public int

Returns:

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
CM_Get_Device_ID_Size
(IntByReference
Receives a value representing the required buffer size, in characters.
pulLen
,
int
Caller-supplied device instance handle that is bound to the local machine.
dnDevInst
,
int
Not used, must be zero.
ulFlags
)

The CM_Get_Device_ID_Size function retrieves the buffer size required to hold a device instance ID for a device instance on the local machine.

public int

Returns:

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes that are defined in Cfgmgr32.h.
CM_Get_DevNode_Registry_Property
(int
A caller-supplied device instance handle that is bound to the local machine.
dnDevInst
,
int
A CM_DRP_-prefixed constant value that identifies the device property to be obtained from the registry. These constants are defined in Cfgmgr32.h.
ulProperty
,
IntByReference
Optional, can be null. A pointer to a location that receives the registry data type, specified as a REG_-prefixed constant defined in Winnt.h.
pulRegDataType
,
Pointer
Optional, can be null. A pointer to a caller-supplied buffer that receives the requested device property. If this value is null, the function supplies only the length of the requested data in the address pointed to by pulLength.
buffer
,
IntByReference
A pointer to a ULONG variable into which the function stores the length, in bytes, of the requested device property.

If the Buffer parameter is set to null, the ULONG variable must be set to zero.

If the Buffer parameter is not set to null, the ULONG variable must be set to the length, in bytes, of the caller-supplied buffer.

pulLength
,
int
Not used, must be zero.
ulFlags
)

The CM_Get_DevNode_Registry_Property function retrieves a specified device property from the registry.

public int

Returns:

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
CM_Get_Parent
(IntByReference
Caller-supplied pointer to the device instance handle to the parent node that this function retrieves. The retrieved handle is bound to the local machine.
pdnDevInst
,
int
Caller-supplied device instance handle that is bound to the local machine.
dnDevInst
,
int
Not used, must be zero.
ulFlags
)

The CM_Get_Parent function obtains a device instance handle to the parent node of a specified device node (devnode) in the local machine's device tree.

public int

Returns:

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
CM_Get_Sibling
(IntByReference
Caller-supplied pointer to the device instance handle to the sibling node that this function retrieves. The retrieved handle is bound to the local machine.
pdnDevInst
,
int
Caller-supplied device instance handle that is bound to the local machine.
dnDevInst
,
int
Not used, must be zero.
ulFlags
)

The CM_Get_Sibling function obtains a device instance handle to the next sibling node of a specified device node (devnode) in the local machine's device tree.

public int

Returns:

If the operation succeeds, CM_Locate_DevNode returns CR_SUCCESS. Otherwise, the function returns one of the CR_Xxx error codes that are defined in Cfgmgr32.h.
CM_Locate_DevNode
(IntByReference
A pointer to a device instance handle that CM_Locate_DevNode retrieves. The retrieved handle is bound to the local machine.
pdnDevInst
,
String
A pointer to a NULL-terminated string representing a device instance ID. If this value is NULL, or if it points to a zero-length string, the function retrieves a device instance handle to the device at the root of the device tree. *
pDeviceID
,
int
A variable of ULONG type that supplies one of the following flag values that apply if the caller supplies a device instance identifier: CM_LOCATE_DEVNODE_NORMAL, CM_LOCATE_DEVNODE_PHANTOM, CM_LOCATE_DEVNODE_CANCELREMOVE, or CM_LOCATE_DEVNODE_NOVALIDATION
ulFlags
)

The CM_Locate_DevNode function obtains a device instance handle to the device node that is associated with a specified device instance ID on the local machine.

Field Detail

CM_DRP_ADDRESSback to summary
public static final int CM_DRP_ADDRESS
CM_DRP_BASE_CONTAINERIDback to summary
public static final int CM_DRP_BASE_CONTAINERID
CM_DRP_BUSNUMBERback to summary
public static final int CM_DRP_BUSNUMBER
CM_DRP_BUSTYPEGUIDback to summary
public static final int CM_DRP_BUSTYPEGUID
CM_DRP_CAPABILITIESback to summary
public static final int CM_DRP_CAPABILITIES
CM_DRP_CHARACTERISTICSback to summary
public static final int CM_DRP_CHARACTERISTICS
CM_DRP_CLASSback to summary
public static final int CM_DRP_CLASS
CM_DRP_CLASSGUIDback to summary
public static final int CM_DRP_CLASSGUID
CM_DRP_COMPATIBLEIDSback to summary
public static final int CM_DRP_COMPATIBLEIDS
CM_DRP_CONFIGFLAGSback to summary
public static final int CM_DRP_CONFIGFLAGS
CM_DRP_DEVICE_POWER_DATAback to summary
public static final int CM_DRP_DEVICE_POWER_DATA
CM_DRP_DEVICEDESCback to summary
public static final int CM_DRP_DEVICEDESC
CM_DRP_DEVTYPEback to summary
public static final int CM_DRP_DEVTYPE
CM_DRP_DRIVERback to summary
public static final int CM_DRP_DRIVER
CM_DRP_ENUMERATOR_NAMEback to summary
public static final int CM_DRP_ENUMERATOR_NAME
CM_DRP_EXCLUSIVEback to summary
public static final int CM_DRP_EXCLUSIVE
CM_DRP_FRIENDLYNAMEback to summary
public static final int CM_DRP_FRIENDLYNAME
CM_DRP_HARDWAREIDback to summary
public static final int CM_DRP_HARDWAREID
CM_DRP_INSTALL_STATEback to summary
public static final int CM_DRP_INSTALL_STATE
CM_DRP_LEGACYBUSTYPEback to summary
public static final int CM_DRP_LEGACYBUSTYPE
CM_DRP_LOCATION_INFORMATIONback to summary
public static final int CM_DRP_LOCATION_INFORMATION
CM_DRP_LOCATION_PATHSback to summary
public static final int CM_DRP_LOCATION_PATHS
CM_DRP_LOWERFILTERSback to summary
public static final int CM_DRP_LOWERFILTERS
CM_DRP_MFGback to summary
public static final int CM_DRP_MFG
CM_DRP_PHYSICAL_DEVICE_OBJECT_NAMEback to summary
public static final int CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME
CM_DRP_REMOVAL_POLICYback to summary
public static final int CM_DRP_REMOVAL_POLICY
CM_DRP_REMOVAL_POLICY_HW_DEFAULTback to summary
public static final int CM_DRP_REMOVAL_POLICY_HW_DEFAULT
CM_DRP_REMOVAL_POLICY_OVERRIDEback to summary
public static final int CM_DRP_REMOVAL_POLICY_OVERRIDE
CM_DRP_SECURITYback to summary
public static final int CM_DRP_SECURITY
CM_DRP_SECURITY_SDSback to summary
public static final int CM_DRP_SECURITY_SDS
CM_DRP_SERVICEback to summary
public static final int CM_DRP_SERVICE
CM_DRP_UI_NUMBERback to summary
public static final int CM_DRP_UI_NUMBER
CM_DRP_UI_NUMBER_DESC_FORMATback to summary
public static final int CM_DRP_UI_NUMBER_DESC_FORMAT
CM_DRP_UPPERFILTERSback to summary
public static final int CM_DRP_UPPERFILTERS
CM_LOCATE_DEVNODE_BITSback to summary
public static final int CM_LOCATE_DEVNODE_BITS
CM_LOCATE_DEVNODE_CANCELREMOVEback to summary
public static final int CM_LOCATE_DEVNODE_CANCELREMOVE
CM_LOCATE_DEVNODE_NORMALback to summary
public static final int CM_LOCATE_DEVNODE_NORMAL
CM_LOCATE_DEVNODE_NOVALIDATIONback to summary
public static final int CM_LOCATE_DEVNODE_NOVALIDATION
CM_LOCATE_DEVNODE_PHANTOMback to summary
public static final int CM_LOCATE_DEVNODE_PHANTOM
CR_ACCESS_DENIEDback to summary
public static final int CR_ACCESS_DENIED
CR_ALREADY_SUCH_DEVINSTback to summary
public static final int CR_ALREADY_SUCH_DEVINST
CR_ALREADY_SUCH_DEVNODEback to summary
public static final int CR_ALREADY_SUCH_DEVNODE
CR_APM_VETOEDback to summary
public static final int CR_APM_VETOED
CR_BUFFER_SMALLback to summary
public static final int CR_BUFFER_SMALL
CR_CALL_NOT_IMPLEMENTEDback to summary
public static final int CR_CALL_NOT_IMPLEMENTED
CR_CANT_SHARE_IRQback to summary
public static final int CR_CANT_SHARE_IRQ
CR_CREATE_BLOCKEDback to summary
public static final int CR_CREATE_BLOCKED
CR_DEFAULTback to summary
public static final int CR_DEFAULT
CR_DEVICE_INTERFACE_ACTIVEback to summary
public static final int CR_DEVICE_INTERFACE_ACTIVE
CR_DEVICE_NOT_THEREback to summary
public static final int CR_DEVICE_NOT_THERE
CR_DEVINST_HAS_REQSback to summary
public static final int CR_DEVINST_HAS_REQS
CR_DEVLOADER_NOT_READYback to summary
public static final int CR_DEVLOADER_NOT_READY
CR_DEVNODE_HAS_REQSback to summary
public static final int CR_DEVNODE_HAS_REQS
CR_DLVXD_NOT_FOUNDback to summary
public static final int CR_DLVXD_NOT_FOUND
CR_FAILUREback to summary
public static final int CR_FAILURE
CR_FREE_RESOURCESback to summary
public static final int CR_FREE_RESOURCES
CR_INVALID_APIback to summary
public static final int CR_INVALID_API
CR_INVALID_ARBITRATORback to summary
public static final int CR_INVALID_ARBITRATOR
CR_INVALID_CONFLICT_LISTback to summary
public static final int CR_INVALID_CONFLICT_LIST
CR_INVALID_DATAback to summary
public static final int CR_INVALID_DATA
CR_INVALID_DEVICE_IDback to summary
public static final int CR_INVALID_DEVICE_ID
CR_INVALID_DEVINSTback to summary
public static final int CR_INVALID_DEVINST
CR_INVALID_DEVNODEback to summary
public static final int CR_INVALID_DEVNODE
CR_INVALID_FLAGback to summary
public static final int CR_INVALID_FLAG
CR_INVALID_INDEXback to summary
public static final int CR_INVALID_INDEX
CR_INVALID_LOAD_TYPEback to summary
public static final int CR_INVALID_LOAD_TYPE
CR_INVALID_LOG_CONFback to summary
public static final int CR_INVALID_LOG_CONF
CR_INVALID_MACHINENAMEback to summary
public static final int CR_INVALID_MACHINENAME
CR_INVALID_NODELISTback to summary
public static final int CR_INVALID_NODELIST
CR_INVALID_POINTERback to summary
public static final int CR_INVALID_POINTER
CR_INVALID_PRIORITYback to summary
public static final int CR_INVALID_PRIORITY
CR_INVALID_PROPERTYback to summary
public static final int CR_INVALID_PROPERTY
CR_INVALID_RANGEback to summary
public static final int CR_INVALID_RANGE
CR_INVALID_RANGE_LISTback to summary
public static final int CR_INVALID_RANGE_LIST
CR_INVALID_REFERENCE_STRINGback to summary
public static final int CR_INVALID_REFERENCE_STRING
CR_INVALID_RES_DESback to summary
public static final int CR_INVALID_RES_DES
CR_INVALID_RESOURCEIDback to summary
public static final int CR_INVALID_RESOURCEID
CR_INVALID_STRUCTURE_SIZEback to summary
public static final int CR_INVALID_STRUCTURE_SIZE
CR_MACHINE_UNAVAILABLEback to summary
public static final int CR_MACHINE_UNAVAILABLE
CR_NEED_RESTARTback to summary
public static final int CR_NEED_RESTART
CR_NO_ARBITRATORback to summary
public static final int CR_NO_ARBITRATOR
CR_NO_CM_SERVICESback to summary
public static final int CR_NO_CM_SERVICES
CR_NO_DEPENDENTback to summary
public static final int CR_NO_DEPENDENT
CR_NO_MORE_HW_PROFILESback to summary
public static final int CR_NO_MORE_HW_PROFILES
CR_NO_MORE_LOG_CONFback to summary
public static final int CR_NO_MORE_LOG_CONF
CR_NO_MORE_RES_DESback to summary
public static final int CR_NO_MORE_RES_DES
CR_NO_REGISTRY_HANDLEback to summary
public static final int CR_NO_REGISTRY_HANDLE
CR_NO_SUCH_DEVICE_INTERFACEback to summary
public static final int CR_NO_SUCH_DEVICE_INTERFACE
CR_NO_SUCH_DEVINSTback to summary
public static final int CR_NO_SUCH_DEVINST
CR_NO_SUCH_DEVNODEback to summary
public static final int CR_NO_SUCH_DEVNODE
CR_NO_SUCH_LOGICAL_DEVback to summary
public static final int CR_NO_SUCH_LOGICAL_DEV
CR_NO_SUCH_REGISTRY_KEYback to summary
public static final int CR_NO_SUCH_REGISTRY_KEY
CR_NO_SUCH_VALUEback to summary
public static final int CR_NO_SUCH_VALUE
CR_NOT_DISABLEABLEback to summary
public static final int CR_NOT_DISABLEABLE
CR_NOT_SYSTEM_VMback to summary
public static final int CR_NOT_SYSTEM_VM
CR_OUT_OF_MEMORYback to summary
public static final int CR_OUT_OF_MEMORY
CR_QUERY_VETOEDback to summary
public static final int CR_QUERY_VETOED
CR_REGISTRY_ERRORback to summary
public static final int CR_REGISTRY_ERROR
CR_REMOTE_COMM_FAILUREback to summary
public static final int CR_REMOTE_COMM_FAILURE
CR_REMOVE_VETOEDback to summary
public static final int CR_REMOVE_VETOED
CR_SAME_RESOURCESback to summary
public static final int CR_SAME_RESOURCES
CR_SUCCESSback to summary
public static final int CR_SUCCESS
CR_WRONG_TYPEback to summary
public static final int CR_WRONG_TYPE
INSTANCEback to summary
public static final Cfgmgr32 INSTANCE
NUM_CR_RESULTSback to summary
public static final int NUM_CR_RESULTS

Method Detail

CM_Get_Childback to summary
public int CM_Get_Child(IntByReference pdnDevInst, int dnDevInst, int ulFlags)

The CM_Get_Child function is used to retrieve a device instance handle to the first child node of a specified device node (devnode) in the local machine's device tree.

Parameters
pdnDevInst:IntByReference

Caller-supplied pointer to the device instance handle to the child node that this function retrieves. The retrieved handle is bound to the local machine.

dnDevInst:int

Caller-supplied device instance handle that is bound to the local machine.

ulFlags:int

Not used, must be zero.

Returns:int

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.

See Also
CM_Get_Child
CM_Get_Device_IDback to summary
public int CM_Get_Device_ID(int devInst, Pointer Buffer, int BufferLen, int ulFlags)

The CM_Get_Device_ID function retrieves the device instance ID for a specified device instance on the local machine.

Parameters
devInst:int

Caller-supplied device instance handle that is bound to the local machine.

Buffer:Pointer

Address of a buffer to receive a device instance ID string. The required buffer size can be obtained by calling CM_Get_Device_ID_Size, then incrementing the received value to allow room for the string's terminating NULL.

BufferLen:int

Caller-supplied length, in characters, of the buffer specified by Buffer.

ulFlags:int

Not used, must be zero.

Returns:int

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.

See Also
CM_Get_Device_ID
CM_Get_Device_ID_Sizeback to summary
public int CM_Get_Device_ID_Size(IntByReference pulLen, int dnDevInst, int ulFlags)

The CM_Get_Device_ID_Size function retrieves the buffer size required to hold a device instance ID for a device instance on the local machine.

Parameters
pulLen:IntByReference

Receives a value representing the required buffer size, in characters.

dnDevInst:int

Caller-supplied device instance handle that is bound to the local machine.

ulFlags:int

Not used, must be zero.

Returns:int

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.

See Also
CM_Get_Device_ID_Size
CM_Get_DevNode_Registry_Propertyback to summary
public int CM_Get_DevNode_Registry_Property(int dnDevInst, int ulProperty, IntByReference pulRegDataType, Pointer buffer, IntByReference pulLength, int ulFlags)

The CM_Get_DevNode_Registry_Property function retrieves a specified device property from the registry.

Parameters
dnDevInst:int

A caller-supplied device instance handle that is bound to the local machine.

ulProperty:int

A CM_DRP_-prefixed constant value that identifies the device property to be obtained from the registry. These constants are defined in Cfgmgr32.h.

pulRegDataType:IntByReference

Optional, can be null. A pointer to a location that receives the registry data type, specified as a REG_-prefixed constant defined in Winnt.h.

buffer:Pointer

Optional, can be null. A pointer to a caller-supplied buffer that receives the requested device property. If this value is null, the function supplies only the length of the requested data in the address pointed to by pulLength.

pulLength:IntByReference

A pointer to a ULONG variable into which the function stores the length, in bytes, of the requested device property.

If the Buffer parameter is set to null, the ULONG variable must be set to zero.

If the Buffer parameter is not set to null, the ULONG variable must be set to the length, in bytes, of the caller-supplied buffer.

ulFlags:int

Not used, must be zero.

Returns:int

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes that are defined in Cfgmgr32.h.

CM_Get_Parentback to summary
public int CM_Get_Parent(IntByReference pdnDevInst, int dnDevInst, int ulFlags)

The CM_Get_Parent function obtains a device instance handle to the parent node of a specified device node (devnode) in the local machine's device tree.

Parameters
pdnDevInst:IntByReference

Caller-supplied pointer to the device instance handle to the parent node that this function retrieves. The retrieved handle is bound to the local machine.

dnDevInst:int

Caller-supplied device instance handle that is bound to the local machine.

ulFlags:int

Not used, must be zero.

Returns:int

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.

See Also
CM_Get_Parent
CM_Get_Siblingback to summary
public int CM_Get_Sibling(IntByReference pdnDevInst, int dnDevInst, int ulFlags)

The CM_Get_Sibling function obtains a device instance handle to the next sibling node of a specified device node (devnode) in the local machine's device tree.

Parameters
pdnDevInst:IntByReference

Caller-supplied pointer to the device instance handle to the sibling node that this function retrieves. The retrieved handle is bound to the local machine.

dnDevInst:int

Caller-supplied device instance handle that is bound to the local machine.

ulFlags:int

Not used, must be zero.

Returns:int

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.

See Also
CM_Get_Sibling
CM_Locate_DevNodeback to summary
public int CM_Locate_DevNode(IntByReference pdnDevInst, String pDeviceID, int ulFlags)

The CM_Locate_DevNode function obtains a device instance handle to the device node that is associated with a specified device instance ID on the local machine.

Parameters
pdnDevInst:IntByReference

A pointer to a device instance handle that CM_Locate_DevNode retrieves. The retrieved handle is bound to the local machine.

pDeviceID:String

A pointer to a NULL-terminated string representing a device instance ID. If this value is NULL, or if it points to a zero-length string, the function retrieves a device instance handle to the device at the root of the device tree. *

ulFlags:int

A variable of ULONG type that supplies one of the following flag values that apply if the caller supplies a device instance identifier: CM_LOCATE_DEVNODE_NORMAL, CM_LOCATE_DEVNODE_PHANTOM, CM_LOCATE_DEVNODE_CANCELREMOVE, or CM_LOCATE_DEVNODE_NOVALIDATION

Returns:int

If the operation succeeds, CM_Locate_DevNode returns CR_SUCCESS. Otherwise, the function returns one of the CR_Xxx error codes that are defined in Cfgmgr32.h.

See Also
CM_Locate_DevNode