Cash drawers are very popular in retail shops and it is one of the main component for every Point of Sale System(POS). There is some code to implement this component with our software system. Our Cash drawer software has source code which checks Machine status i.e; machine connected or not, Machine Open/Close, Machine serial number, Installation date, Machine revision, Manufacture date, etc. Using this source code you can open the cashDrawer and print the bill without any problem.
How it works:
0 — If the cash drawer CLOSED, the return value is zero.
1 — If the cash drawer OPENED, the return value is one.
2 – The error of printer doesn’t OPEN yet.
3 – Spooler operation error.
5 – Re-opened error.
Else – If the function fails, the return value is nonzero.
Different Functions of this machine:
ppstOPEN – To OPEN printer driver port of the assigned printer name. This function needs to execute before to get cash drawer status.
ppNAME – The printer name of printer driver.
ppstCLOSE – To CLOSE printer driver port of the opened printer name. This function needs to execute before the end of application.
ppstGET – To get OPEN ED or CLOSED status of cash drawer that connected to opened printer name.
This utility supports Windows 9x/NT/2000/XP/VISTA/Windows 7/Windows 8.
The source code of this project is available in C Program, C ++ program, Visual basic, VB.NET and JAVA.
The below download link has sample code which you can copy paste to your projects.