Partager via


AccelerometerStart (Compact 2013)

3/26/2014

This function sends a start I/O control (IOCTL) to the driver.

Syntax

DWORD WINAPI AccelerometerStart(
    HSENSOR hAccDevice,
    HANDLE hMsgQueue
);

Parameters

  • hAccDevice
    [in] Handle of the opened accelerometer device previously returned by the AccelerometerOpen function.
  • hMsgQueue
    [in] Handle of the message queue to receive the accelerometer samples. This handle is returned from a call to CreateMsgQueue. The cbMaxMessage member of MSGQUEUEOPTIONS should be set to sizeof(ACC_DATA).

Return Value

The following table shows the possible return values.

Value

Description

ERROR_SUCCESS

Indicates success.

ERROR_INVALID_PARAMETER

Indicates that the handle of the accelerometer device and/or the handle of the message queue is invalid.

Win32 error code

Indicates all other errors.

Remarks

After a call to this function, data samples are delivered to the user-supplied message queue. Queue messages conform to the ACC_DATA structure.

Only one message queue handle is allowed for an HSENSOR instance. Multiple calls to AccelerometerStart for a single HSENSOR instance return an error message.

Requirements

Header

accapi.h

See Also

Reference

Accelerometer COREDLL.DLL Functions
IOCTL_ACC_STARTSENSOR