Hi
I write a POS (point-of-sale) applic. until now i use c# code to open
the cash-drawer.
But now there is a new hardware and i have just a c++ code snip to do
this.
Please can somebody help me to translate this:
#include <windows.h>
// szDeviceName ->Device Driver Name
// CTL_ID-Control Code
__declspec( dllimport ) DWORD WINAPI DeviceControl(LPSTR szDeviceName,
DWORD CTL_ID);
__declspec( dllimport ) DWORD WINAPI PortwellGetCashDrawerStatus(LPSTR
szDeviceName,DWORD CTL_ID);
void main()
{
DWORD ret; // 0 -success, -1 -create file
failed, -2 -device io control failed
ret = DeviceControl("\\\\.\\FEC_cash", 10);
......
ret = PortwellGetCashDrawerStatus("\\\\.\\FEC_cash", 11);
....
into C#
is LPSTR a byte[] ?
is DWORD = UInt32 ?
is "\\\\.\\FEC_cash" = @"\\.\FEC_cash"
Thank you
Peter