Receive an Event an event from a c++ dll

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I woud catch the scan event raised when a barcode is readed from my symbol
ppt 8800.

This is the function that I would use:

DWORD SCAN_ReadLabelEvent(HANDLE hScanner,
LPSCAN_BUFFER lpScanBuffer,HANDLE hEvent,
DWORD dwTimeOut, LPDWORD lpdwRequestID
);


How can I receive the event in CF?

Thank in Advance,

Alex
 
There's insufficient information on what the 'event' is in this context to
answer the question there, but, at a guess, you should be able to P/Invoke
that call from managed code. I don't know how you get the hScanner value,
or what the lpScanBuffer is, or what the lpdwRequestID is, but the
declaration might look something like this:

[DllImport("<whatever>.dll"]
public static extern uint SCAN_ReadLabelEvent(IntPtr hScanner,
byte[] lpScanBuffer, IntPtr hEvent, uint dwTimeOut, ref uint
lpdwRequestID);

You'd have to do a CreateEvent() to create the event, I presume. If you
want to give us some information on what the call does, I might be able to
get closer to the right answer.

Paul T.
 
Do that, and then use WaitForSingleObject to wait unitl event is signalled

--
Alex Feinman
---
Visit http://www.opennetcf.org
Paul G. Tobey said:
There's insufficient information on what the 'event' is in this context to
answer the question there, but, at a guess, you should be able to P/Invoke
that call from managed code. I don't know how you get the hScanner value,
or what the lpScanBuffer is, or what the lpdwRequestID is, but the
declaration might look something like this:

[DllImport("<whatever>.dll"]
public static extern uint SCAN_ReadLabelEvent(IntPtr hScanner,
byte[] lpScanBuffer, IntPtr hEvent, uint dwTimeOut, ref uint
lpdwRequestID);

You'd have to do a CreateEvent() to create the event, I presume. If you
want to give us some information on what the call does, I might be able to
get closer to the right answer.

Paul T.


Alex said:
I woud catch the scan event raised when a barcode is readed from my symbol
ppt 8800.

This is the function that I would use:

DWORD SCAN_ReadLabelEvent(HANDLE hScanner,
LPSCAN_BUFFER lpScanBuffer,HANDLE hEvent,
DWORD dwTimeOut, LPDWORD lpdwRequestID
);


How can I receive the event in CF?

Thank in Advance,

Alex
 
Thanks for your reply,

I did not remember the CreateEvent instruction,

Alex

Alex Feinman said:
Do that, and then use WaitForSingleObject to wait unitl event is signalled

--
Alex Feinman
---
Visit http://www.opennetcf.org
Paul G. Tobey said:
There's insufficient information on what the 'event' is in this context to
answer the question there, but, at a guess, you should be able to P/Invoke
that call from managed code. I don't know how you get the hScanner value,
or what the lpScanBuffer is, or what the lpdwRequestID is, but the
declaration might look something like this:

[DllImport("<whatever>.dll"]
public static extern uint SCAN_ReadLabelEvent(IntPtr hScanner,
byte[] lpScanBuffer, IntPtr hEvent, uint dwTimeOut, ref uint
lpdwRequestID);

You'd have to do a CreateEvent() to create the event, I presume. If you
want to give us some information on what the call does, I might be able to
get closer to the right answer.

Paul T.


Alex said:
I woud catch the scan event raised when a barcode is readed from my symbol
ppt 8800.

This is the function that I would use:

DWORD SCAN_ReadLabelEvent(HANDLE hScanner,
LPSCAN_BUFFER lpScanBuffer,HANDLE hEvent,
DWORD dwTimeOut, LPDWORD lpdwRequestID
);


How can I receive the event in CF?

Thank in Advance,

Alex
 
Back
Top