Win32 Error. Code 1400. Invalid Window Handle

Posted on 2004-11-02
Last Modified: 2011-10-03
Hi there

We have an application built in Borland C++ Builder which runs fine, except that on Windows XP sometimes produces a series of error messages:
"Win32 Error. Code 1400. Invalid Window Handle" when the machine goes into standby or hibernation or when the screen saver starts up.
The machine will very rapidly produce hundreds of these errors.
I have not been able to trap these errors, and would appreciate any clues that would narrow down what type of event might be triggering this kind of exception.

Thank you
Question by:alonnovy
    1 Comment
    LVL 23

    Accepted Solution

    I have only done a little bit of borland c++ and more of vb 6, it sounds like you are using borland c++ to find a windows handle and some where in your coding it  is coming up with the wrong id for a windows handle and you would need to either do some exception handling to trap these errors, use flags to identify each handle and maybe a resume next loop so that anything that works will work and the handles that are invalid it ignores and carrys on going to the next handle. has a tutorial and maybe that will give you some idea.

    hopefully someone who is more knowledgeable in Borland C++ will reply and give you a more definitive answer then I have.

    Maybe you can research on google on the things I have mentioned.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    734 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

    19 Experts available now in Live!

    Get 1:1 Help Now