Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OPOS - Does anyone have coding examples?

Status
Not open for further replies.

koala15

Programmer
May 9, 2001
322
0
0
AU
I am going to extend an application (written in VB6) to include a POS module - quite a simple design using cash drawer, docket printer and mybe a barcode reader.

Since the user's hardware is unknown (except that it will be OPOS compatible) I have investigated the use of OPOS to accomplish this challenge.

I have downloaded the OPOS manual, but it is long on technical detail and extremely short on examples.

Does anyone have any coding examples in any language (especially VB) of "talking" to the devices via OPOS.

Also within the (extremely few) examples provided by the HW manufacturers (eg Epson, Star etc) the connection string to a device details the device model in detail. Do I have to rely on a "non-technical" user telling the application what the model is (and maybe getting it wrong) or is there a way to scan/search for the devices?

Thank you all.

"Life is full of learning, and then there is wisdom"
 
Epson does provide some simple VB samples (but then I take it you already checked them?)

Installed POS-peripherals can be found in the registry under
HKEY_LOCAL_MACHINE\SOFTWARE\OleForRetail\ServiceOPOS
and then them subkeys CashDrawer, LineDisplay, POSPrinter etc. (as per UPOS-specs) where each device has it's own entry.

So what I do is just scanning the registry for the devices registered, read the LDN (logical Device Name) and use that one to open the device!

Diederik
 
Diederik,

Thank you - I will use your suggestion ..... if anyone else has any examples I would be grateful.

Thanks.

"Life is full of learning, and then there is wisdom"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top