|
if all the process u create have window( or create a message only window), u can send the WM_CLOSE message to all the child process. When a WM_CLOSE message arrives, let it send the WM_CLOSE message to its child process and so on...
nave
|
|
|
|
|
This solution won't work for me because I won't be able to keep track of all spawned windows/applications. Spawned application say MS SQL query analyzer is not created by me. So, that application may spawn other applications. I want to implement the function of Kill Process tree just like in Process Explorer by Mark Russinovich (www.sysinternals.com).
Thanks,
Stanly
|
|
|
|
|
stanlymt wrote: This solution won't work for me because I won't be able to keep track of all spawned windows/applications. Spawned application say MS SQL query analyzer is not created by me. So, that application may spawn other applications.
You are doomed!
|
|
|
|
|
Take a look at the Process32First() /Process32Next() pair.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Terminating process, especially processes you didn't even write, is asking for trouble. Here's a quote from MSDN:
"The TerminateProcess function is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used"
The fact that terminating a process is not safe is obvious if you think about it: The process may be in the middle of doing something like updating a file and suddenly it's killed without getting a chance to do any cleanup. This could quite obviously lead to data corruption for example. TerminateProcess is meant as a last resort like when like you have to kill a misbehaving and non-responsive process with task manager.
Steve
|
|
|
|
|
stanlymt wrote: How will I kill all the spawned processes of my application? I dont want to kill my main application, but only the all other processes spawned by my main application? Is there any articles related to this?
look at CreateToolhelp32Snapshot and related api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi ,
My Applicatrion has been using great amount of bandwidth. Now, i want to change the way it works in such a way that the Application should work when there is no bandwidth utilization by other applications . I want to check within my application if the Internet is in Idle state . Can someone help me? Thanks in advance
- Ranjan
|
|
|
|
|
|
I want to run the application when no other applications in the computer are using the Internet.So I want to know when the "Internet is available" AND "other applications are not using the bandwidth".
|
|
|
|
|
sp_ranjan wrote: I want to check within my application if the Internet is in Idle state .
Are you serious?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Windows has some background transfer services. They made the stuff used to download windows updates in the background available to developers.
earl
|
|
|
|
|
The Internet is idle?? Dude, like when does that ever happen.
Chris Meech
I am Canadian. [heard in a local bar]
When no one was looking, every single American woman between the ages of 18 and 32 went out and got a tatoo just above their rumpus. [link[^]]
|
|
|
|
|
If your local network supports quality of service packets set your application to use a low QOS value and then just flood the network.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
hi all,
I have a dialog box application.It has "username" and "password" as labels in english.Can it be possible to display these labels in french,german and other foreign languages.
|
|
|
|
|
What do you want to know exactly ? If the program can auto-translate these words for you ? Then no, this is of course not feasible (it is a compiler, not a translator). If you want to add multilanguage support to your app, you need to manage that yourself (load the strings from a specific resource depending of the language for example).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I have one more doubt.In the"project settings" "Resources" language option is present.What is that used for.
|
|
|
|
|
This is not done automatically.
You have several options to do that: design a dialog for each language you need, xml with the messages/labels, external software that manage the strings, table strings, ...
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You can do it with the MC(Message Compiler) where u should have the other lang strings with you. Otherwise this is not possible
|
|
|
|
|
Hi Gurus,
I need to calculate the size of a folder and its subfolders. It would be very helpful if any of you can provide sample code or suggestions.
Thanks
C++beginer
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
That was helpful. Thank you very much.
C++beginer
|
|
|
|
|
If you are looking to roll your own solution, use the FindFirstFile() /FindNextFile() pair. The size of each file is contained in the WIN32_FIND_DATA structure.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
I try to get the full name of a user in my Windows 2003 Active Directory.
I tried to use NetGetUserInfo(), but receive the error-code 1113. MSDN states, that I may have not sufficient rights to query a user's full name, but I cannot find, where to set the rights in my active directory.
Since my application should also work with Windows 2000 domains and even NT-domains, I don't want to use the functions for ADS-containers (I also have never programmed them before and I don't know enough about them )
So is there any possibility to get a user's full name when I know his login-name and the name of the domain?
greets
Juergen
|
|
|
|
|
You could also use GetUserNameEx function, with the NameDisplay flag. It should work just fine.
|
|
|
|
|
I tried GetUserNameEx(), but I can only get information about the currently logged in user. I need information about all the other domain users. I have a table with login-names and I want to display the realnames of these people because it is much more readable.
Any help here?
Juergen
|
|
|
|