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,472 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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