ACC_Open (Compact 2013)

3/26/2014

This function opens the device for reading, writing, or both.


DWORD  ACC_Open(
  DWORD hDeviceContext,
  DWORD AccessCode,
  DWORD ShareMode);

hDeviceContext

[in] Handle returned by ACC_Init.

AccessCode

[in] Type of access to the object. The value for this parameter is taken directly from the CreateFile function's dwDesiredAccess parameter.

ShareMode

[in] Share mode for the object. The value for this parameter is taken directly from the CreateFile function's dwShareMode parameter.

A handle that can be used in a call to ACC_Close. It is the responsibility of the specific accelerometer model device driver (MDD) implementation to determine what this value represents. A value of zero (0) indicates an error occurred.

When this function executes, your device should allocate the resources that it needs for each open context, and prepare for operation. This might involve preparing the device for reading or writing and initializing data structures that it uses for operation.

Library

accmdd.lib

Show: