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;
}
Содержание OMNii HDK XT10
Страница 4: ......
Страница 10: ......
Страница 12: ......
Страница 18: ......
Страница 20: ......
Страница 24: ......
Страница 26: ......
Страница 32: ......
Страница 72: ......
Страница 90: ......
Страница 92: ......
Страница 116: ......
Страница 124: ......
Страница 126: ......
Страница 130: ......
Страница 132: ......
Страница 154: ......
Страница 168: ......
Страница 170: ......
Страница 182: ......
Страница 184: ......
Страница 188: ......