Chapter 4: Software
Omnii HDK API Functions
36
Psion Teklogix Omnii HDK User Manual
4.7.4
Omnii HDK API Functions
The following sections describe the C functions declared in the file Hdk7545.h.
4.7.4.1 Hdk7545_ExpansionSlotFromActiveRegKey
Syntax
DWORD Hdk7545_ExpansionSlotFromActiveRegKey (const wchar_t *ActiveRegKey,
Hdk7545_Connector *expansionSlot );
Parameters
•
ActiveRegKey – [in] pointer to a null-terminated string containing the driver active registry
key of the driver. For example (under HKEY_LOCAL MACHINE) “\Drivers\Active\31”.
The active key is passed to the XXX_Init function of the driver as the context value, cast to a
DWORD. This parameter must not be null.
•
expansionSlot – [out] pointer to the expansion connector slot ID. This parameter must not
be null.
Description
This function is used to retrieve the ID of the expansion slot containing the device this driver is
going to control. The connector ID value returned can be used in a call to Hdk7545_Open.
This function can only be used by drivers loaded by the Peripherals Driver. Other drivers and
applications must determine the expansion slot with which to communicate through other means.
Returns
•
ERROR_SUCCESS – if successful. The ‘expansionSlot’ parameter contains a valid ID.
•
ERROR_INVALID_PARAMETER – one of the pointers was null or incorrect.
•
ERROR_INVALID_DATA – an exception was generated.
•
ERROR_NOT_SUPPORTED – this device is not supported by the HDK.
•
Other errors are possible.
4.7.4.2 Hdk7545_Open
Syntax
DWORD Hdk7545_Open( HANDLE *hdk, Hdk7545_Connector connector );
Parameters
•
hdk – [out] pointer to a HANDLE. If the open call succeeds, the handle is changed to a valid
handle value that can be used in other HDK operations.
•
connector – [in] one of the values in the Hdk7545_Connector enumeration identifying the
expansion slot (or other connector) being controlled.
Description
This function is used to open a handle to the Psion Teklogix HDK. The handle opened can then be
used in other HDK functions. The handle must be closed using Hdk7545_Close(). This parameter
must not be null. Each handle is tied to a single particular expansion slot or connector.
The expansion slot or other connector being controlled is determined by the 'connector' parameter.
If this function is being called from a device driver loaded by the Peripherals driver, the value for
this parameter can be determined by calling the Hdk7545_ExpansionSlotFromActiveRegKey
Note: HDK functions cannot be called from the xxx_Init method of a driver loaded by the
peripherals driver.
Summary of Contents for OMNii HDK XT10
Page 4: ......
Page 10: ......
Page 12: ......
Page 18: ......
Page 20: ......
Page 24: ......
Page 26: ......
Page 32: ......
Page 72: ......
Page 90: ......
Page 92: ......
Page 116: ......
Page 124: ......
Page 126: ......
Page 130: ......
Page 132: ......
Page 154: ......
Page 168: ......
Page 170: ......
Page 182: ......
Page 184: ......
Page 188: ......