Solved

Project tamperproof.exe raised an exception class EOSError with message 'System error. Code:1400. Invaild window handle'. Proccess Stopped. Use Step or Run to continue.

Posted on 2004-09-10
9
1,440 Views
Last Modified: 2012-06-21
Hey,

I keep getting this error message on application start and I have done nothing to cause it. I need urgent fix! This is what the error contains ...

Project tamperproof.exe raised an exception class EOSError with message 'System error. Code:1400. Invaild window handle'. Proccess Stopped. Use Step or Run to continue.

There is a checkbox with View CPU windows but I dont know any of that Rubbish. If I press ok it just quits back to Delphi 7.

Please help me I need help urgently!

Cheers,

Jeremy Dey
0
Comment
Question by:computerprogramer
9 Comments
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 12024572
did you tried to debug it. Which method cause this error.

check in Call Stack to see which is the last called function...
0
 

Author Comment

by:computerprogramer
ID: 12024868
it says all these numbers as followed by the green arrow ...
 
0040C971 FF33             push dword ptr [ebx]
0
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12025070
This EOSErrors sometimes come up when there's a call that is not compatible with the OS, like if you write code for a NT platform and execute it on a 95/98....

What about the oncreate/onshow procedures? Some code to show here?

F68 ;-)
0
 
LVL 20

Expert Comment

by:Madshi
ID: 12025174
Maybe madExcept can help?

http://help.madshi.net/madExcept.htm
http://madshi.net/madCollection.exe

Free for non-commercial purpose (and for evaluation).
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 4

Expert Comment

by:Evarest
ID: 12025389
As Ivanov_G said: "did you tried to debug it. Which method cause this error". Place a breakpoint on the first line of TForm1.OnCreate and hit F9. When the pointer is at the breakpoint keep hitting F8 until you get the error. Maybe you'll now see which line is triggering that resp. error...

Kind regards,
Evarest
0
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 40 total points
ID: 12026344
These kinds of questions aren't very helpful. It's like someone dialling 911, yelling "There's a house on fire" and then disconnecting again. With a bit of luck they can discover who made the call, and hopefully the person will reply and tell exactly where the fire is. So, let's see...

> I keep getting this error message on application start and I have done nothing to cause it.
The number of users that I've seen who claimed the same thing is just amazingly high. And almost every time they HAD done something that caused the error. Like in one situation where users used a client-server application and someone had turned off the server... All users unhappy, of course. Or the user who had moved some folder to another disk and then complained his data wasn't found. Of course, sometimes the user is right. I did have one user who said the application responded funny. Result? A flawed harddisk.
In general, something has always changed. You're just not aware of it. So what did you change between the last time it worked and the first time it didn't work?

> I need urgent fix! This is what the error contains ...
If it is urgent then be more precise. The more info we have, the better and faster we can help.


> Project tamperproof.exe raised an exception class EOSError
Tamperproof, eh? You're writing some secure application, probably relying heavily on the Windows API? Are you using XP and have you installed Service Pack 2?

> with message 'System error. Code:1400. Invaild window handle'. Proccess Stopped. Use Step or Run to continue.
Simple. In some API function that you're using you provide the system with a wrong handle. Perhaps you've just entered 0 or another constant while the function needs the handle of an existing window. Check all your API calls with the exact specifications provided by the MSDN site. Maybe you're providing a windows handle of a window that has been closed again...

> There is a checkbox with View CPU windows but I dont know any of that Rubbish. If I press ok it just quits back to Delphi 7.
The CPU window is never really useful anyway. Unless you're going deep into the Windows API.

> Please help me I need help urgently!
Then provide more information. Pieces of sourcecode, information about components you're using, the method that failed while you're debugging, the call stack information, the Windows version you're using. And remember, you're in a hurry. We're patient enough to wait for you to provide more information. ;-)
0
 
LVL 6

Assisted Solution

by:vadim_ti
vadim_ti earned 40 total points
ID: 12028287
try to run it from explorer, without delphi environment
may be you will get another error message
0
 

Author Comment

by:computerprogramer
ID: 12033180
Hi thanks for the replys...

> Tamper Proof eh?

Yip, Security Application and it does use Windows API

Ok heres the low down...

I have being programming this for about a year and now suddenly when I run it I get that error message. I did the toggle Break Point thing and the error pops up on Application.Run. Iam using Windows XP Professional no service packs.

It has been running fine I dont know what could have cause this and I havnt changed anything. Here is my code for Form.Create ...

procedure TForm1.FormCreate(Sender: TObject);
var reg:tregistry; i: integer;
begin
  // register the same message
  TheMessage := RegisterWindowMessage(PChar('Tamperproof'));
    // start the hook
  hHookLib := LoadLibrary('THEHOOK.DLL');
  if hHookLib <> 0 then begin
    {Get the function addresses}
    @StartTheHook := GetProcAddress(hHookLib, 'StartTheHook');
    try
      StartTheHook;
    except
      ShowMessage('Critical Error (1) Tamper Proof must close');
    end;
    FreeLibrary(hHookLib);
  end else begin
    ShowMessage('Critical Error (2) Tamper Proof must close');
  end;
reg:=tregistry.Create; //create registry entry
reg.RootKey:= hkey_local_machine; //sets the root key
reg.OpenKey('software\microsoft\windows\currentversion\run',true); //open the key
reg.WriteString('Tamper Proof','c:\Tamper Proof\Tamper.exe'); //write a command string to be added to the key
reg.Free; //free up the registry entry
SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @i, 0);
EnableMenuItem(GetSystemMenu( Form1.Handle, LongBool(False)),
SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
CoolTrayIcon1.HideTaskbarIcon;
end;

Cheers,

Jeremy Dey
0
 

Author Comment

by:computerprogramer
ID: 12033191
FALSE ALARM FALSE ALARM!

Sorry guys I just went to the registery and my program had locked itself in LOL!
Sorry I dunno what to do with the points though?

I wil give them to both vadim t and Workshop Alex who sparked an Idea in my head about the registery,

Cheers,

Thanks everyone!,

Jeremy Dey
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now