Partager via


ACC_Open (Compact 2013)

3/26/2014

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

Syntax

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

Parameters

  • 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.

Return Value

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.

Remarks

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.

Requirements

Library

accmdd.lib

See Also

Reference

Accelerometer MDD Functions