tags:

views:

750

answers:

2

I use an activex component in my C# program that was created with Delphi. It works fine a lot of the time, but occasionally (sometimes frequently!) the component crashes with this exception:

Exception EOSError (A call to an OS function failed)(0)

which leaves the control in a somewhat unusable state until the program is restarted. There doesn't seem to be any rhyme or reason to be able to reproduce the error.

Any ideas?

A: 

What does GetLastError give you? As in:

ShowMessage(SysErrorMessage(GetLastError));
JosephStyons
+1  A: 

If you can reproduce the issue in a controlled environment, using a tool like MadExcept to get callstack information from the error situation might help to track down the exact reason for the problem.

In the past (< Windows NT), said error would sometimes occur when your machine was running out of resources. Any chance your ActiveX control is leaking window handles? A tool like MemProof might help you out tracking those down.

Paul-Jan