AccelerometerOpen (Compact 2013)
3/26/2014
This function opens a handle to an instance of the accelerometer device.
Syntax
HSENSOR AccelerometerOpen(
__in_z LPCWSTR szDeviceName,
__deref_opt_out PLUID pSensorLuid
);
Parameters
- szDeviceName
[in] Pointer to a NULL-terminated string that specifies the name of the accelerometer device, such as "ACC1:". This device name can be found using the FindFirstDevice or FindNextDevice functions using the guidAccelerometer3dType GUID as the pvSearchParameter parameter.
- pSensorLuid
[out] Pointer to an LUID that contains the sensor-unique ID.
Return Value
The following table shows the possible return values.
Value |
Description |
---|---|
A handle to an instance of the accelerometer device |
Indicates success. |
INVALID_HANDLE_VALUE |
Indicates that a handle to the accelerometer device could not be created. |
INVALID_HSENSOR_VALUE |
Indicates that the capabilities of the accelerometer device could not be determined. |
Remarks
The handle returned by this function is a required parameter to other accelerometer functions. When an application is finished using the object handle returned by AccelerometerOpen, use the CloseHandle function to close the handle.
Requirements
Header |
accapi.h |