|
You can use of FindWindow or EnumWindows.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hello Hamid
I try with FindWindow but I need class or window name and for ex. if i try
to made check for excel I must enter XLAMAIN for class name.
Is there any way to FinndWindow by exe...FindWindow(excel.exe,NULL) ???
|
|
|
|
|
Do an EnumWindows to enumerate all top level windows.
For each window handle that is returned in the EnumWindowsProc , call GetWindowThreadProcessId to get the process Id to which the window belongs.
Now you can use the following APIs to get the name of the EXE.
OpenProcess<br />
GetModuleBaseName<br />
CloseProcess
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
komofilms77 wrote: I need HWND to do this I can get HANDLE but i can not used it instead HWND???
If you already have the process handle, call GetProcessID() followed by EnumWindows() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
How to run dos command from my MFC exe application
Trioum
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
And see here[^]
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
in VC# or VC++ pls give some sourse code or methods to generate the installed application list from a remote system...and to invoke an application from that list... its a part of my prog..(i am doing the project in Visual)
|
|
|
|
|
Did you search on the codeproject I think I saw an article about it.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
geogen george wrote: in VC# or VC++ pls give some sourse code or methods to generate the installed application list from a remote system...
Reading from HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall, remote or local, is easy enough, but that list is only as good as the programs that installed them. In other words, there's no way to know of all programs that are on a system.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Can not create Inprocess Reco Engine
|
|
|
|
|
good for you.
This signature was proudly tested on animals.
|
|
|
|
|
|
See here[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Sumanta Banerjee wrote: Can not create Inprocess Reco Engine
In the other news, KFC recommends pepsi.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
BTW: welcome again in the CP's Memorable Quotes List [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'm not sure if I can keep this pace.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Well, you're young and talented...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Will the destructor called in case of excetion occures, Note DataMember is a class data member whoese instance is created
out of try bock, Pls suggest best way to handle it.
~Cls::Cls()
{
delete DataMember;
}
Cls::Function()
{
DataMember = new DataMember;
try
{
}
Catch()
{
}
}
|
|
|
|
|
If you're creating the object using the new operator, the destructor will be called only when you do a delete.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Well true, but in this case I am talking about the destrutor of ~Cls::Cls, when exception occure in Cls::Function().
What would be best way to delete DataMember; incase exception occur
|
|
|
|
|
~Cls::Cls will not be called unless you are calling Cls::Function from Cls::Cls .
You must delete DataMember in the catch block.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Would Finally will be more approriate ?
but DataMember is not in try block
|
|
|
|
|
It is recommended you use try/catch rather than __try/__finally .
Since DataMember is declared outside the try block, it is accessible in the catch block also.
If it were declared inside the try block, then you wouldn't be able to delete it in the catch block.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|