User's Manual

-24
2. BYTE SUNLITRFID_Open (
HWND hWnd,
LPCWSTR PortName,
DWORD BaudRate,
SUNLITRFID_ENVIRONMENT *Environment
);
SUNLITRFID_Open is used to open the comport
Parameters
hWnd
The program’s HANDLE as a parameter that send thru the Function. If you don’t know what’s your program’s HANDLE, use
NULL.
PortName
The comport name you want to open.
BaudRate
The comport baud rate that you want to open with.
Environment
Please see TYPE definition.
Return Values
The function will return byte value that indicate the execution result.Please see MESSAGE definition for byte value.
For example
SUNLITRFID_ENVIRONMENT Environment;
WCHAR wcaPortName[]={‘C’,’O’,’M’,’1’,0x00};
if(SUNLITRFID_Open(NULL,wcaPortName,19200,&Environment)==HANDLE_SUCCESS)
{}//Open comport successfully
else //Open comport failed
{}