次の方法で共有


IOCTL_ACC_STARTSENSOR (Compact 2013)

3/26/2014

This I/O control message starts the accelerometer sensor. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to the device
    DWORD dwIoControlCode,    // use IOCTL_ACC_STARTSENSOR
    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
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    [in] Handle to the device. To obtain a device handle, call CreateFile.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_ACC_STARTSENSOR for this operation.
  • lpInBuffer
    [in] Handle to the device to start.
  • nInBufferSize
    [in] Set to sizeof(HSENSOR)
  • lpOutBuffer
    [in][out] Pointer to a DWORD that contains an error code.
  • nOutBufferSize
    [in] Set to sizeof(DWORD).
  • lpBytesReturned
    [out] Pointer to a DWORD giving the length of the returned data.
  • lpOverlapped
    [in] Ignored, set to NULL.

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.

Requirements

Library

accmdd.lib

See Also

Reference

Accelerometer MDD IOCTLs
IOCTL_ACC_STOPSENSOR