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,493 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 23

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

623 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