Hi,
I'm new to Zebra, and when I use CoreScanner SDK to fire BarcodeEvent as sample code Zebra provides. Ideally I want to write a function after Zebra gets barcode back as following codes but it doesn't work. Can someone help me ?
Thank you.
void OnBarcodeEvent(short eventType, ref string pscanData)
{
string barcode = pscanData;
this.Invoke((MethodInvoker)delegate { can I write a function to execute data ? });
}
1 Replies
Hi Wally
Did you execute the REGISTER_FOR_EVENTS method with the SUBSCRIBE_BARCODE event type?
executes an
Open
for all types of scanners and anExecCommand
with theREGISTER_FOR_EVENTS
method using the following XML and aGetScanners
API call:NOTE The first <inArgs> tag in the XML is filled with the number of events you want to register. In the example above, number of event it wants to register is "6". The second tag is filled with the event ids that you want to register separated by the commas (","). See event IDs in table below.
Table 2: Supported Event IDs
Event Name Event ID
SUBSCRIBE_BARCODE 1
SUBSCRIBE_IMAGE 2
SUBSCRIBE_VIDEO 4
SUBSCRIBE_RMD 8
SUBSCRIBE_PNP 16
SUBSCRIBE_OTHER 32