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.

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
computerprogramerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Wim ten BrinkConnect With a Mentor Self-employed developerCommented:
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
 
Ivanov_GCommented:
did you tried to debug it. Which method cause this error.

check in Call Stack to see which is the last called function...
0
 
computerprogramerAuthor Commented:
it says all these numbers as followed by the green arrow ...
 
0040C971 FF33             push dword ptr [ebx]
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
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
 
MadshiCommented:
Maybe madExcept can help?

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

Free for non-commercial purpose (and for evaluation).
0
 
EvarestCommented:
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
 
vadim_tiConnect With a Mentor Commented:
try to run it from explorer, without delphi environment
may be you will get another error message
0
 
computerprogramerAuthor Commented:
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
 
computerprogramerAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.