IOCTL_HAL_SET_DEVICE_INFO

This IOCTL is called to set the data returned by IOCTL_HAL_GET_DEVICE_INFO. The OEMIoControl function calls this IOCTL.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_SET_DEVICE_INFO.
  • lpInBuf
    [in]Points to a buffer that can contain a string and a DWORD that represents the data to be changed. This DWORD is at the front of the string and can be set to on of the following values: SPI_GETPLATFORMTYPE or SPI_GETOEMINFO. The string can be any string and length that is supported by the hardware platform.
  • nInBufSize
    [in] Set to the size of the buffer pointed to by lpInBuf.
  • lpOutBuf
    [in] Set to NULL.
  • nOutBufSize
    [in] Set to 0.
  • lpBytesReturned
    [in] Set to NULL.

Remarks

This IOCTL should only be enabled in a test platform and not on a retail device. It allows you to take a platform, such as a CEPC, and force it to mimic another device type.

The following code example shows how to implement IOCTL_HAL_SET_DEVICE_INFO.

case IOCTL_HAL_SET_DEVICE_INFO:
   if (nInBufSize >= sizeof(DWORD)) {
     len = *(LPDWORD)lpInBuf;
     switch (len) {
     case SPI_GETPLATFORMTYPE :
       nInBufSize -= sizeof(DWORD);
       if (nInBufSize <= sizeof(HALPlatformStr)){
           memcpy (HALPlatformStr, ((LPBYTE)lpInBuf)+sizeof(DWORD),            nInBufSize);
           retval = TRUE;
       } else {
           SetLastError(ERROR_INVALID_PARAMETER);
       }
       break;
     default :
       SetLastError(ERROR_INVALID_PARAMETER);
       break;
     }
   } else {
     SetLastError(ERROR_INVALID_PARAMETER);
   }
break;

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pkfuncs.h.

See Also

IOCTL_HAL_GET_DEVICE_INFO | OEMIoControl

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.