Skip navigation links
JNA API 5.10.0
com.sun.jna.platform.win32

Interface Cfgmgr32

  • All Superinterfaces:
    Library


    public interface Cfgmgr32
    extends Library
    Windows Cfgmgr32.
    Author:
    widdis[at]gmail[dot]com
    • Method Detail

      • CM_Locate_DevNode

        int CM_Locate_DevNode(IntByReference pdnDevInst,
                              java.lang.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 - A pointer to a device instance handle that CM_Locate_DevNode retrieves. The retrieved handle is bound to the local machine.
        pDeviceID - 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 - 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:
        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
      • CM_Get_Parent

        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 - 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 - Caller-supplied device instance handle that is bound to the local machine.
        ulFlags - Not used, must be zero.
        Returns:
        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_Child

        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 - 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 - Caller-supplied device instance handle that is bound to the local machine.
        ulFlags - Not used, must be zero.
        Returns:
        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_Sibling

        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 - 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 - Caller-supplied device instance handle that is bound to the local machine.
        ulFlags - Not used, must be zero.
        Returns:
        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_Get_Device_ID

        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 - Caller-supplied device instance handle that is bound to the local machine.
        Buffer - 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 - Caller-supplied length, in characters, of the buffer specified by Buffer.
        ulFlags - Not used, must be zero.
        Returns:
        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_Size

        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 - Receives a value representing the required buffer size, in characters.
        dnDevInst - Caller-supplied device instance handle that is bound to the local machine.
        ulFlags - Not used, must be zero.
        Returns:
        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_Property

        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 - A 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.
        pulRegDataType - 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 - 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 - 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 - Not used, must be zero.
        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.
JNA API 5.10.0

Copyright © 2007-2018 Timothy Wall. All Rights Reserved.