hi gabor

the "event" function is there so you can give the handle to your event
(which you get from CreateEvent).  then you can create a thread that
blocks on this event with one of the wait functions
(WaitForSingleObject, for instance).  when the reader receives a scan,
it will set the event and your thread will resume and process the scan
buffer.

now this method is also platform specific, since the event functions
are in the windows unit.  can anyone comment on this for linux?  my
hunch is that a similar thing must exist...

henry

On 24/11/06, Gabor Boros <[EMAIL PROTECTED]> wrote:
I am developing an application for a mobil computer with an integrated
barcode scanner which is running WinCE. The API presents two solutions.

DWORD SCAN_ReadLabelMsg(HANDLE hScanner,LPSCAN_BUFFER lpScanBuffer,
                         HWND,UINT uiMsgNo, DWORD dwTimeOut,
                         LPDWORD lpdwRequestID);

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

I use first because I don't know what is Event in the second case.

Gabor



Micha Nelissen írta:
> Gabor Boros wrote:
>> Hi,
>>
>> My problem is, the Scan procedure not executed.
>> I tried with Delphi and working.
>> I am missed something or is this a bug?
>
> Message passing/handling is in general not to be relied upon, for
> cross-platform reasons. There are other alternatives usually. What is it
> you want to accomplish ?
>
> Micha
>

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to