User's Manual

-25
3. BYTE SUNLITRFID_OpenII(
HWND hWnd,
LPCWSTR PortName,
DWORD BaudRate,
HANDLE *haEvent,
SUNLITRFID_TAGID *ActiveTagID
);
SUNLITRFID_OpenII 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.
haEvent
:Please see 「TYPE」 definition.
ActiveTagID
: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
:
HANDLE haEvent[ENVIRONMENT_EVENT_NUMBER];
SUNLITRFID_TAGID ActiveTagID;
WCHAR wcaPortName[]={‘C’,’O’,’M’,’1’,0x00};
if(SUNLITRFID_Open(NULL,wcaPortName,19200,haEvent, &ActiveTagID)==HANDLE_SUCCESS)
{}//Open comport successfully
else//Open comport failed
{}