OEMIoControl

This function provides a generic I/O control code (IOCTL) for OEM-supplied information.

  BOOL OEMIoControl (
DWORD dwIoControlCode,
LPVOID lpInBuf,
DWORD nInBufSize,
LPVOID lpOutBuf,
DWORD nOutBufSize,
LPDWORD lpBytesReturned );

Parameters

  • dwIoControlCode
    I/O control code. This should be one of the values in the following table.

    Value Description
    IOCTL_HAL_GET_DEVICE_INFO Provides information about the systems parameter information (SPI) codes supported by .
    IOCTL_HAL_GET_IP_ADDR Supports retrieval of target device Ethernet address information provided in the structure EDBG_ADDR.
    IOCTL_HAL_ILTIMING Supports ILTiming.exe functionality.
    IOCTL_HAL_INIT_RTC Supports resetting of the real-time clock by calling OEMSetRealTime.
    IOCTL_HAL_REBOOT Supports a warm boot of the target device.
    IOCTL_HAL_SEND_UDP Supports a call to EdbgSendUDP.
    IOCTL_EDBG_DEREGISTER_CLIENT Supports a call to the Ethernet debug function EdbgDeregisterClient.
    IOCTL_EDBG_REGISTER_CLIENT Supports a call to the Ethernet debug function EdbgRegisterClient (Target Device).
    IOCTL_EDBG_RECV Supports a call to the Ethernet debug function EdbgRecv.
    IOCTL_EDBG_SEND Supports a call to the Ethernet debug function EdbgSend.
    IOCTL_EDBG_SET_DEBUG Supports a call to the Ethernet debug function EdbgSetDebug (Target Device).
    IOCTL_QUERY_PHYSICALMEM Returns information about physical memory.
    IOCTL_SET_KERNEL_COMM_DEV Supports a call to SetKernelCommDev.
  • lpInBuf
    Pointer to the input buffer that can contain additional information associated with the dwIoControlCode.

    When the parameter dwIoControlCode has the value IOCTL_HAL_GET_DEVICE_INFO, the parameter lpInBuf contains one of the SPI_* codes in the following table.

    Value Description
    SPI_GETPLATFORMTYPE String specifying the type of Windows CE device.
    SPI_GETOEMINFO String specifying OEM information that distinguishes this specific device from others of the same type.
  • nInBufSize
    Size in bytes of lpInBuf. For example, when dwIoControlCode is set to IOCTL_HAL_GET_DEVICE_INFO and the input buffer contains the SPI code, nInBufsize is set to the value 4.

  • lpOutBuf
    Pointer to the output buffer supplied by the caller. Your implementation should place the information requested by the parameters dwIoControlCode and lpInBuf into lpOutBuf, set lpBytesReturned to indicate the size of the data in lpOutbuf, and return TRUE*.* If the size of the requested information exceeds the buffer size specified by nOutBufSize, call SetLastError with the flag ERROR_INSUFFICIENT_BUFFER and return the value FALSE.

  • nOutBufSize
    Specifies the maximum number of bytes that can be returned in lpOutBuf. The caller sets this value.

  • lpBytesReturned
    Number of bytes returned in lpOutBuf.

Return Values

TRUE indicates success; FALSE indicates failure.

Remarks

This function is the means of returning system information requested by the function SystemParametersInfo. This function must be implemented. When a device driver or routine calls the KernelIoControl kernel routine to pass an IOCTL, the kernel in turn calls OEMIoControl.

The system is fully preemptible when this function is called. The kernel does no processing but passes all parameters directly to this function. The kernel function is provided to allow an OEM device driver to communicate with kernel mode OEM adaptation layer (OAL) code.

Note that within this function, it is allowable to make Windows CE API calls.

A sample implementation is provided in the Oemioctl.c file.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.10 and later Oemioctl.c    

See Also

KernelIoControl,