Chapter 4: Software
Omnii HDK API Functions
Psion Teklogix Omnii HDK User Manual
37
function. If this function is being called from a driver loaded by other means (installed under
Drivers\Builtin) or is being called from an application, the correct expansion slot must be known
by the caller in advance.
Returns
•
ERROR_SUCCESS – if successful. The handle pointed to by 'hdk' is now valid.
•
ERROR_INVALID_PARAMETER – the 'hdk' pointer is null, or the specified connector
is invalid.
•
ERROR_INVALID_DATA – an exception was generated.
•
ERROR_NOT_SUPPORTED – this device is not supported by the HDK.
•
Other errors are possible.
Sample Code
4.7.4.3 Hdk7545_Close
Syntax
DWORD Hdk7545_Close( HANDLE *hdk );
Parameters
•
hdk – [in] pointer to a valid open HDK handle.
Description
This function is used to close an open HDK handle and release all the resources it owns. The
handle cannot be used after it is closed.
Returns
•
ERROR_SUCCESS – if successful. The handle is now closed.
•
ERROR_INVALID_HANDLE – the specified handle is invalid or null.
•
ERROR_INVALID_DATA - an exception was generated.
•
Other errors are possible.
Sample Code
See sample code for
.
DWORD OpenAndCloseHdk( const wchar_t *ActiveKey )
{
Hdk7545_Connector expansionSlot = Hdk7545_Connector_Invalid;
DWORD result = Hdk7545_ExpansionSlotFromActiveRegKey(ActiveKey,&expansionSlot);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_FOUND;
}
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
result = Hdk7545_Open(&hdkHandle, expansionSlot);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_SUPPORTED;
}
// ...
Hdk7545_Close(&hdkHandle);
return ERROR_SUCCESS;
}
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: ......