次の方法で共有


IOCTL_HAL_GET_DEVICE_INFO (Compact 2013)

10/16/2014

This I/O control message provides information about the system parameters information (SPI) codes supported by the SystemParametersInfo function. Send this message with OEMIoControl.

Syntax

BOOL OEMIoControl(
    DWORD dwIoControlCode,    // use IOCTL_HAL_GET_DEVICE_INFO
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned   // number of bytes returned
);

Parameters

  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_HAL_GET_DEVICE_INFO for this operation.
  • lpInBuffer
    [in] Pointer to an SPI code that determines what information this function returns:

    • SPI_GETBOOTMENAME   The device BOOTME name; for example, CEPC53902.
    • SPI_GETGUIDPATTERN   Platform-specific GUID pattern.
    • SPI_GETOEMINFO   The model number and manufacturer name.
    • SPI_GETPLATFORMMANUFACTURER   The platform manufacturer name.
    • SPI_GETPLATFORMNAME   The platform product release name.
    • SPI_GETPLATFORMTYPE   Deprecated, use SPI_GETPROJECTNAME instead.
    • SPI_GETPLATFORMVERSION   The version number, as {{CE_MAJOR_VER, CE_MINOR_VER}}. For example, version 4.2 is returned as {4,2}.
    • SPI_GETPROJECTNAME   The project description string.
    • SPI_GETUUID   A 16-byte UUID for the platform.
  • nInBufferSize
    [in] Size, in bytes, of lpInBuffer. Must be 4.
  • lpOutBuffer
    Pointer to the output buffer.
  • nOutBufferSize
    Size in bytes of lpOutBuffer.
  • lpBytesReturned
    [out] The size of the requested information, if it is larger than nOutBufSize.

Return Values

Returns TRUE if successful; otherwise, returns FALSE.

Remarks

To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.

The following table shows common error values:

Error

Description

ERROR_INSUFFICIENT_BUFFER

The requested information exceeds nOutBufSize.

If the requested information exceeds nOutBufferSize, this function returns the required size in lpBytesReturned and returns FALSE. You can then allocate sufficient buffer space before calling this function again. You can request the SPI codes by calling the OEMIoControl function with this I/O control.

This function replaces IOCTL_HAL_GET_DEVICEID (deprecated) and IOCTL_HAL_GET_UUID.

Requirements

Header

pkfuncs.h

See Also

Reference

Device Information IOCTLs
OEMIoControl