Hdk7515_Close - Psion EP10 User Manual

Hand-held computer hdk
Hide thumbs Also See for EP10:
Table of Contents

Advertisement

Chapter 3: Software
EP10 HDK API Functions
Description
This function is used to open a handle to the Psion HDK. The handle opened can then be used in other HDK
functions. The handle must be closed using Hdk7515_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.
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 peripheral is not supported by the HDK.
Other errors are possible.
Sample Code
DWORD OpenAndCloseHdk( )
{
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7515_Open(&hdkHandle, Hdk7515_Connector_Docking);
if( result != ERROR_SUCCESS ) {
}
// ...
Hdk7515_Close(hdkHandle);
hdkHandle = INVALID_HANDLE_VALUE;
return ERROR_SUCCESS;
}
3.7.3.2

Hdk7515_Close

Syntax
DWORD Hdk7515_Close( HANDLE hdk );
Parameters
hdk – [in] 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
22
Psion EP10 HDK User Manual
return ERROR_NOT_SUPPORTED;
Section 3.7.3.1:
"Hdk7515_Open".

Advertisement

Table of Contents
loading

Related Products for Psion EP10

Table of Contents