Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Killing the DOS window, Part II.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00502520
Message ID:
00502905
Vues:
19
Hi!

Only one instance of NTWDM could be in the memory. If you kill it, you will kill all DOS or Windows 3.* programs currently running.

There are special API functions for DOS programs that are located in the separate DLL. I do not know details, but you can try to search from this side. Try also to send this to some other forums that are more related to API functions and low-level programming for Windows (For example, C++ forums).

I can also post a sample of correct killing of windows application, but I did not tried it with DOS program (just to compare with your code), if you want.

>Hi All,
>
>I managed to be able to kill the FoxPro DOS application running in a DOS window.
>But, there is one problem. I can find the window handle by the window name. I can find the process handle related to the DOS window name. That process handle points me to CMD.EXE, and if I try to kill it, nothing happens to actual DOS window, despite the return code from TerminateProcess API function is 1. In order to kill the real DOS process I have to kill the related ntvdm.exe.
>
>So, the question is, how I can find the ntvdm.exe process which is related to corresponding CMD.EXE? If there is more than one DOS window, how do I know which ntvdm.exe corresponds to the certain window name?
>
>Of course I can just loop through all ntvdm.exe instances and kill them all, but that would be overkill... :)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform