public abstract class Cfgmgr32Util
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Cfgmgr32Util.Cfgmgr32Exception |
Constructor and Description |
---|
Cfgmgr32Util() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
CM_Get_Device_ID(int devInst)
Utility method to call Cfgmgr32's CM_Get_Device_ID_Size, allocates the
required memory for the Buffer parameter based on the type mapping used,
calls to CM_Get_Device_ID, and returns the received string.
|
static java.lang.Object |
CM_Get_DevNode_Registry_Property(int devInst,
int ulProperty)
Utility method to call Cfgmgr32's CM_Get_DevNode_Registry_Property that
allocates the required memory for the Buffer parameter, and returns values of
the appropriate type.
|
public static java.lang.String CM_Get_Device_ID(int devInst) throws Cfgmgr32Util.Cfgmgr32Exception
devInst
- Caller-supplied device instance handle that is bound to the local
machine.Cfgmgr32Util.Cfgmgr32Exception
public static java.lang.Object CM_Get_DevNode_Registry_Property(int devInst, int ulProperty) throws Cfgmgr32Util.Cfgmgr32Exception
devInst
- Caller-supplied device instance handle that is bound to the local
machine.ulProperty
- A CM_DRP_
-prefixed constant value that identifies the
device property to be obtained from the registry. These constants
are defined in Cfgmgr32.h.Object
containing the specified registry property for the
device.
If the property is of type WinNT.REG_SZ
, a
String
is returned.
If the property is of type WinNT.REG_MULTI_SZ
, an array of
String
is returned.
If the property is of type WinNT.REG_DWORD
, an
Integer
is returned.
If the property is of type WinNT.REG_BINARY
, an array of
Byte
is returned.
If no value exists for this property (error
Cfgmgr32.CR_NO_SUCH_VALUE
), returns null
.
Cfgmgr32Util.Cfgmgr32Exception
- on any errors other than Cfgmgr32.CR_NO_SUCH_VALUE