tags:

views:

101

answers:

0

I'm developing a OPOS Service Object for fiscal printers. I came to implement the events.

According to the Monroe documentation, the SO initiates events by calling an event request method exposed by the Control Object.

So, as far I understand, in my SO I should declare and initialize the Monroe CO and to fire an event I should call the CO request methods.

Event Request Methods OPOS Event
SOData | DataEvent
SODirectIO | DirectIOEvent
SOError | ErrorEvent
SOOutputComplete | OutputCompleteEvent
SOStatusUpdate | StatusUpdateEvent

What I am doing wrong? How to get the instance of the CO?

Edit:
The method OpenService dives me pointer to the CO instance (pDispatch).
How to utilize that pointer?

Using Delphi 7.

Edit:
I figoured it out. I had to cast FCO:= (pDispatch as IOPOSFiscalPrinter);
FCO.SOStatusUpdate(...);