|
still you didn't leave this topic...??? i appriciate your attitude.. but if something(of lesser importance) takes too much time, we should consider skipping it .
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
VivekuniQ wrote: if something(of lesser importance) takes too much time, we should consider skipping it .
Thats What we call Right attitude to develop the Software..
"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
|
|
|
|
|
1. How do we write an exit handle for a windows app that gets executed even when an app is terminated from the task manager?
2. when the app is terminated from the task manager, a DLL's processdetach doesnt seem to get called. what then is the way to cleanup the DLL in this case?
thanks.
|
|
|
|
|
conceptus wrote: How do we write an exit handle for a windows app that gets executed even when an app is terminated from the task manager?
Isn't WM_CLOSE the message you want ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I dont know. Does it take care of the case when someone terminates it from the task manager 1)generally and 2)when app is not responding?
thanks
|
|
|
|
|
Sorry man, WM_CLOSE will never get called. It gets called when the user exits the app using the close button etc.
There is something more which is done.
this is this.
|
|
|
|
|
WM_CLOSE wont work for that u should find some other way .
But as far as i know if the application is not responding
and is teriminated by the user through End_Task method .
There is now way it can process messages.
There are two solutions:-
1> Use another application which uses HOOK funda
2> Disable the Task Manager
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Mmmh, may I ask why you want to do such a thing ? Closing your app with the Task Manager is not a solution ! Maybe you better find a solution to the root problem (why it hangs when you try to exit your program).
|
|
|
|
|
Cedric Moonen wrote: Closing your app with the Task Manager is not a solution ! Maybe you better find a solution to the root problem (why it hangs when you try to exit your program).
My program doesnt hang, nor do I ask the end users to terminate it through task manager. However, for the sake of completeness, I still want to consider this case of doing cleanup, who knows in some dire situation the end user may really want to terminate the app. They are using windows afterall
let me know if there is a solution.
|
|
|
|
|
If you start thinking like that, you can also suppose that you'll need to save your data every 10 seconds because a crash of the system can occur (or no power), that you have to ask for confirmation for everything the user enter as data because it may be the cat that is walking on the keyboard, ...
And for the sake of completeness, you may also detect that a mouse, a keyboard and a screen are well connected to your computer .
It is clear that using the TaskManager to close an application will result in memory leaks (it is clearly stated when you try to kill an app). But if the user still want to continue, then it's up to him.
|
|
|
|
|
i like this way of thinking !
'5' for you
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I understand. How about this: I have some buffered data that I need to flush when the app exits. How do I make sure this always happens.
All I need to know is whether this is possible. The product will anyway ship even if this part doesnt get into it, but I just wanted to know if anyone handles it or leaves it to destiny...that is, windows OS
|
|
|
|
|
conceptus wrote: 1. How do we write an exit handle for a windows app that gets executed even when an app is terminated from the task manager?
It depends on if you use End Task or End Process. The former sends the application window a WM_CLOSE message while the latter uses TerminateProcess() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I have an MFC programe but i want to create
a DLL such that i can put some of my code in
the DLL only for security reason .
Actually i need to make my code secure so
no one unauthoriesed can change the code .
Can i put some functions in the Dll and compile
the DLL & use that same in my MFC ?if yes HOW?
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
The web is full of examples on creating and using dlls. Why is your MFC app not secure enough for you ? You dll will be no more secure, it will be less so ( because anyone can replace your dll with their own ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
vikas amin wrote: i need to make my code secure so
you dont code a DLL with binary directly. its also done with the same readable C++ code, so if somebody is able to see your MFC code, they'll also be able to see what's in your DLL right? if u consider hiding the DLL, y not hide the MFC application itself?? go for a DLL if u think your application'd need changes in future. or if u wanna use the process(dll) in multiple applications. (sharing the same code)
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
try Dll/Exe encrypter like ARMADILLO[^]
"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
|
|
|
|
|
hi
I want to open the DLL files and see the code in them.
are there any tools for that?if so ,plz post the URL's.
thanx in advance
|
|
|
|
|
vamshin wrote: I want to open the DLL files and see the code in them.
No Such Thing Exist In world Today, From which you can reterive the code that already converted inro the machine langauge..
"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
|
|
|
|
|
hi vamshin
what exactli do you like to see? "..and see the code in them" - there is no tool to produce 'souce code'.
karo
|
|
|
|
|
hi
i just wanted to know how can we know what functions are present in dll?
eg:i get a DLL created by another developer and i want to know the functions in that DLL.
Is type libraries(i.e tli and .tlh files) the answer???
plz throw some light on this issue
|
|
|
|
|
if the author of the DLL allow you to use its functions, he might have provided an header file as interface for you to know the functions synopsis you can use.
if not, whatever you will try is pure hack and certainly forbidden !
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
vamshin wrote: i just wanted to know how can we know what functions are present in dll?
Click start navigate to your Visual Studio entry in programs, select tools sub menu. In the tools sub menu you will find a program called Dependency viewer. Open the DLL with Dependency viewer it will give a list of all exported function names but not the arguments nor the returns. That’s up to you to figure out.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
If want to see the code of a compiled dll
then there is no real software availabel for that,
Some people do that it is a comples topic "Reverse Engg".
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
But using Reverse Engg.. present you the exact code
"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
|
|
|
|