Partager via


xxx_IOControl (Services.exe) (Windows CE 5.0)

Send Feedback

This function is used to send a control code to a service.

BOOL xxx_IOControl(DWORDdwData,DWORD dwCode,PBYTE pBufIn,DWORD dwLenIn,PBYTE pBufOut,DWORD dwLenOut,PDWORD pdwActualOut);

Parameters

  • dwData
    [in] Specifies the value returned by xxx_Init (Services.exe) for the given service instance.
  • dwCode
    [in] Specifies the control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it.
  • pBufIn
    [in] Pointer to a buffer that contains the data required to perform the operation. This parameter can be NULL if the dwCode parameter specifies an operation that does not require data.
  • dwLenIn
    [in] Specifies the size, in bytes, of the buffer pointed to by pBufIn.
  • pBufOut
    [out] Pointer to a buffer that receives the output data from the operation. This parameter can be NULL if the dwCode parameter specifies an operation that does not produce output data.
  • dwLenOut
    [in] Specifies the size, in bytes, of the buffer pointed to by pBufOut.
  • pdwActualOut
    [out] Pointer to a variable that receives the size, in bytes, of the data stored into the buffer pointed to by pBufOut. If the output buffer is too small to return any data, then the call fails and GetLastError returns the error code ERROR_INSUFFICIENT_BUFFER, and the returned byte count is zero.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

The control code specifies the action that the driver is to perform. For example, a control code can ask a service to return information or direct the service to carry out an action. Windows CE. NET provides a number of standard control codes. In addition, a service can define its own service-specific control code. For more information, see Services.exe IOCTLS.

Services.exe uses the xxx prefix. When implementing the stream interface, replace xxx with a prefix appropriate for your specific implementation. For more information, see Stream Interface Driver Implementation.

Note   In the past, some services have used the parameters of xxx_IOControl incorrectly. For example, some services have used the pBufIn parameter to pass a 32-bit DWORD value instead of a pointer. Services.exe no longer supports this incorrect usage. Before calling into your service, services.exe will now perform extra checks to make sure that the 32-bit value is a legal pointer. If the value for pBufIn is not legal, services.exe will not call xxx_IOControl.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Developer-defined.
Library: Developer-implemented.

See Also

xxx_Init (Services.exe) | Services.exe Functions | Services.exe IOCTLS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.