
29 PCI-1680U/1682U User Manual
Chapter 4 Software Requirements
4.3.2 CloseHandle
Close the port by calling this function when operation is completed.
Syntax
BOOL CloseHandle(
HANDLE hDevice
);
Parameters
Return Value
Successful: return non-zero values. Unsuccessful: return zero value. Please call Get-
LastError function.
Example
//close
BOOL bRet = CloseHandle(hDevice);
See Also
CreateFile
4.3.3 DeviceIoControl
Users can use this interface to send commands, configure ports, like stop device,
start device, configure Baud Rate, etc.
See Command_par, CanStatusPar_t for detailed configuration.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice,
DWORD dwIoControlCode,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
);
Name Direction Description
hDevice Input Handle of the device which was opened.
Comentarios a estos manuales