When using my debugger, I am getting a "Error_IO_Pending" message.
I found this, but don't understand it all.
API calls that may take a significant amount of time to complete
(MgslTransmit, MgslReceive, MgslWaitEvent, MgslGetTraceEvent) require
that the application pass an application allocated OVERLAPPED
structure to the API. Initialize the hEvent member of the overlapped
structure with the handle of a WIN32 manual reset event allocated with
CreateEvent. Set the other members of the overlapped structure to
zero. If the API returns ERROR_IO_PENDING, monitor the event with the
WIN32 functions WaitForSingleObject or WaitForMultipleObjects. When
the API signals the event object, the call is complete and returned
information is valid.
For more information about the OVERLAPPED structure, WIN32 events, and
synchronization refer to the WIN32 SDK documentation.
Implement polling by calling WaitForSingleObject with a time-out of 0,
which returns immediately with the state of the event object.
Implement blocking by setting the time-out to the macro INFINITE,
causing WaitForSingleObject to return only after the API call has
completed. Pass a finite time-out to block until completion or the
expiration of the time-out.
The API calls that use asynchronous notification can have only one
pending instance of each API call. For example, if a MgslTransmit call
is pending, the application cannot call MgslTransmit again until the
original call completes. Different API calls, such as MgslTransmit and
MgslReceive, may be simultaneously pending. Calling an API function
that uses asynchronous notification while an instance of that API call
is already pending, results in a return code of ERROR_BUSY.
CAUTION:
When calling API routines which may not complete immediately
(MgslTransmit, MgslReceive, MgslWaitEvent, and/or MgslGetTraceEvent),
it is imperative that you not make a call to the same routine passing
the same OVERLAPPED structure and event object handle if the prior
call returns ERROR_IO_PENDING.
Every API call will either complete immediately, or at a later time.
If the call returns ERROR_IO_PENDING, the call will complete as some
later time. If the call can process the request immediately, the call
completes synchronously, in a timely fashion, returning to the
application.
Thus, if a call previously returned ERROR_IO_PENDING, and the
application erroneously makes the same call, passing the same
OVERLAPPED structure and event object handle, the API will determine
that an identical call is already in progress. As the call completes
immediately, with an ERROR_BUSY status, the event object will be
signaled, indicating the call has completed.
In this case, the second call completed with an error, and the first
call is still pending. But, the event object has been signalled, which
could cause the application to believe the first operation was
completed.
..data
Provider_Name db "Senta",0
Failed db "RegisterEventSource failed.",0
AppName db "SiegeWorks",0
string1 db "An unhandled exception has occurred.",0 ; 36
bytes
;string2 db " ",0
;string3 db " ",0
stringpointers label dword
DWORD offset string1
;DWORD offset string2
;DWORD offset string3
..DATA?
hEventLog HWND ?
dwEventDataSize DWORD ?
..code
start:
push offset Provider_Name
push NULL
Call RegisterEventSource
push eax
;int 3
..IF eax == NULL
;invoke GetLastError
;invoke wsprintf, addr OutputBuffer, addr Failed, eax
invoke MessageBox, NULL, addr Failed, addr AppName, MB_OK
..ELSE
;mov [dwEventDataSize], (sizeof stringpointers)
; bRet = ::ReportEvent(m_hEventLog, // event log source handle
; wType, // event type to log
; 0, // event category
; 0x20000001L, // event identifier (GENERIC_MESSAGE)
; pSid, // user security identifier (optional)
; 1, // number of strings to merge with message
; 0, // size of binary data, in bytes
; lpStrings, // array of strings to merge with message
; NULL); // address of binary data
pop eax
mov [hEventLog], eax ; copy handle for storage
invoke ReportEvent,hEventLog,EVENTLOG_INFORMATION_TYPE,0,20000001H,
NULL,1,sizeof string1,addr stringpointers,NULL
invoke DeregisterEventSource,hEventLog
..ENDIF
|
|
0
|
|
|
|
Reply
|
Andy
|
2/8/2011 3:27:46 PM |
|
On Feb 8, 10:27=A0am, Andy <chocolatemint77...@nospicedham.yahoo.com>
wrote:
> When using my debugger, I am getting a "Error_IO_Pending" message.
>
> I found this, but don't understand it all.
>
> API calls that may take a significant amount of time to complete
> (MgslTransmit, MgslReceive, MgslWaitEvent, MgslGetTraceEvent) require
> that the application pass an application allocated OVERLAPPED
> structure to the API. Initialize the hEvent member of the overlapped
> structure with the handle of a WIN32 manual reset event allocated with
> CreateEvent. Set the other members of the overlapped structure to
> zero. If the API returns ERROR_IO_PENDING, monitor the event with the
> WIN32 functions WaitForSingleObject or WaitForMultipleObjects. When
> the API signals the event object, the call is complete and returned
> information is valid.
>
I'm just guessing, but this is common enough that it just might be the
problem. The standard heap is marked as "serialized" -- meaning any
code trying to access that memory will be temporarily halted if
another piece of code is accessing it at the same time. The fix is
easy enough that it is worth giving a try.
Simply create your own heap (HeapCreate) and allocate your
"application allocated OVERLAPPED structure" from this new heap.
Hope that helps.
Nathan.
|
|
0
|
|
|
|
Reply
|
Nathan
|
2/8/2011 3:55:12 PM
|
|
On Feb 8, 9:55=A0am, Nathan <nathancba...@nospicedham.gmail.com> wrote:
> On Feb 8, 10:27=A0am, Andy <chocolatemint77...@nospicedham.yahoo.com>
> wrote:
>
> > When using my debugger, I am getting a "Error_IO_Pending" message.
>
> > I found this, but don't understand it all.
>
> > API calls that may take a significant amount of time to complete
> > (MgslTransmit, MgslReceive, MgslWaitEvent, MgslGetTraceEvent) require
> > that the application pass an application allocated OVERLAPPED
> > structure to the API. Initialize the hEvent member of the overlapped
> > structure with the handle of a WIN32 manual reset event allocated with
> > CreateEvent. Set the other members of the overlapped structure to
> > zero. If the API returns ERROR_IO_PENDING, monitor the event with the
> > WIN32 functions WaitForSingleObject or WaitForMultipleObjects. When
> > the API signals the event object, the call is complete and returned
> > information is valid.
>
> I'm just guessing, but this is common enough that it just might be the
> problem. =A0The standard heap is marked as "serialized" -- meaning any
> code trying to access that memory will be temporarily halted if
> another piece of code is accessing it at the same time. =A0The fix is
> easy enough that it is worth giving a try.
>
> Simply create your own heap (HeapCreate) and allocate your
> "application allocated OVERLAPPED structure" from this new heap.
>
> Hope that helps.
>
> Nathan.
Thanks for your help.
I took your advice and used HeapCreate and HeapAlloc and that problem
is fixed.
I am now getting an Invalid_Parameter with this line in my code:
invoke ReportEvent,hEventLog,EVENTLOG_INFORMATION_TYPE,0,20000001H,
NULL,1,sizeof string1,addr stringpointers,NULL
Andy
|
|
0
|
|
|
|
Reply
|
Andy
|
2/9/2011 3:34:31 PM
|
|
|
2 Replies
506 Views
(page loaded in 0.919 seconds)
Similiar Articles: Error_IO_Pending - comp.lang.asm.x86When using my debugger, I am getting a "Error_IO_Pending" message. I found this, but don't understand it all. API calls that may take a signific... Event Monitor notification information: - comp.sys.hp.hpux ...Error_IO_Pending - comp.lang.asm.x86 The API calls that use asynchronous notification can have only one pending ... If the API returns ERROR_IO_PENDING, monitor the event ... Swinstall error : source is already in use - comp.sys.hp.hpux ...Error_IO_Pending - comp.lang.asm.x86 Swinstall error : source is already in use - comp.sys.hp.hpux ... Error_IO_Pending - comp.lang.asm.x86 is already pending, results in ... initialize for union of structure failed - comp.compilers.lcc ...Error_IO_Pending - comp.lang.asm.x86 initialize for union of structure failed - comp.compilers.lcc ... version is 3.8 with compiled time : Dec 2 2008 union u { int i; char ... how to check if operation returns an error - comp.lang.ruby ...Hi all, I started learning ruby two weeks ago and I'm loving it. I'm coding some date/time program to practice at the moment and I hit a wall. I nee... Windows error message: Not enough storage is available - comp.soft ...Error_IO_Pending - comp.lang.asm.x86 Windows error message: Not enough storage is available - comp.soft ... Error_IO_Pending - comp.lang.asm.x86 Windows error message: Not ... Failed to initialize crypto API - comp.dcom.sys.ciscoError_IO_Pending - comp.lang.asm.x86 Failed to initialize crypto API - comp.dcom.sys.cisco Failed to initialize crypto API - comp.dcom.sys.cisco Failed to initialize ... Application error occurred during request processing - comp.lang ...Error_IO_Pending - comp.lang.asm.x86 If the call can process the request immediately, the ... if a call previously returned ERROR_IO_PENDING, and the application ... db ... LogonUser fails and GetLastError returns 0 - comp.os.ms-windows ...Error_IO_Pending - comp.lang.asm.x86..data Provider_Name db "Senta",0 Failed db ... In this scenario, WriteFile returns FALSE and the GetLastError function returns ERROR ... An unknown erorr occurred while accessing P:\ - comp.cad ...Error_IO_Pending - comp.lang.asm.x86... db "An unhandled exception has occurred.",0 ; 36 ... halted if > another piece of code is accessing it at ... ReadFile function - Microsoft Corporation: Software, Smartphones ...If ReadFile() returns FALSE and GetLastError() returns ERROR_IO_PENDING, the operation is pending. It is unclear in various pieces of documentation whether ... Error Codes: Windows Error 997 - ERROR_IO_PENDING: Overlapped I/O ...[ Close Window ] The class that teaches you how to successfully sell your FileMaker Pro solution as a professional shrinkwrapped software application. 7/24/2012 3:10:26 PM
|