Ich nochmal.
Kann es sein, daß du beim Lesen entweder den Dateinamen nicht richtigs setzt.
Also den ComPort nicht richtig angibts. Müßte als Dateiname dann z.b. 'COM1:' sein.
Oder das hier vielleicht beim CreateFile übersehen?
| Zitat: |
FILE_FLAG_OVERLAPPED
Instructs the operating system to initialize the object, so ReadFile, WriteFile, ConnectNamedPipe, and TransactNamedPipe operations that take a significant amount of time to process return ERROR_IO_PENDING. When the operation is finished, an event is set to the signaled state.
When you specify FILE_FLAG_OVERLAPPED, the ReadFile and WriteFile functions must specify an OVERLAPPED structure. That is, when FILE_FLAG_OVERLAPPED is specified, an application must perform overlapped reading and writing.
When FILE_FLAG_OVERLAPPED is specified, the operating system does not maintain the file pointer. The file position must be passed as part of the lpOverlapped parameter (pointing to an OVERLAPPED structure) to the ReadFile and WriteFile functions.
This flag also enables more than one operation to be performed simultaneously with the handle (a simultaneous read and write operation, for example).
|
Oder
Beim ReadFile eben jenen Record Overlapped nicht richtig angegeben.
Also als ReadFile(..,@OverlappedRec) ?
Oder ich hab keine Ahnung für's Erste.

Stellen Sie sich bitte Zirkusmusik vor.