Click here to Skip to main content
16,016,301 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Shared directories Pin
Garth J Lancaster25-Aug-07 17:52
professionalGarth J Lancaster25-Aug-07 17:52 
GeneralRe: Shared directories Pin
Fernando A. Gomez F.25-Aug-07 18:45
Fernando A. Gomez F.25-Aug-07 18:45 
AnswerRe: Shared directories Pin
aks.26-Aug-07 17:28
aks.26-Aug-07 17:28 
QuestionSendMessage set LPARAM data Pin
Perspx25-Aug-07 13:59
Perspx25-Aug-07 13:59 
AnswerRe: SendMessage set LPARAM data Pin
machengzhi25-Aug-07 14:49
machengzhi25-Aug-07 14:49 
GeneralRe: SendMessage set LPARAM data Pin
Perspx25-Aug-07 23:37
Perspx25-Aug-07 23:37 
QuestionHooking ExitProcess Pin
Waldermort25-Aug-07 13:35
Waldermort25-Aug-07 13:35 
AnswerRe: Hooking ExitProcess Pin
Perspx25-Aug-07 13:48
Perspx25-Aug-07 13:48 
If the hooking you want to do is for your own process you do not need to inject a DLL (although it is pretty fun :p) - you can call it from your application using the SetWindowsHookEx() command. For your case, however, I don't believe that you can use hooking, as ExitProcess doesn't send a message to a window - check out MSDN to read up on the SetWindowsHookEx() command.

I'm slightly puzzled; ExitProcess() calls DLL_PROCESS_DETACH in your DLL. Now if FooBar.dll is yours and you have code for it.. Why can't you write some code in the DLL_PROCESS_DETACH code in the DllMain() procedure in your DLL to see why the DLL is exiting and, if so, trapping it? Might that be a way to do it?

Hope this helps!
--PerspX

"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates

GeneralRe: Hooking ExitProcess Pin
Waldermort25-Aug-07 13:59
Waldermort25-Aug-07 13:59 
AnswerRe: Hooking ExitProcess Pin
Perspx25-Aug-07 14:06
Perspx25-Aug-07 14:06 
GeneralRe: Hooking ExitProcess Pin
Richard Andrew x6425-Aug-07 14:32
professionalRichard Andrew x6425-Aug-07 14:32 
GeneralRe: Hooking ExitProcess Pin
Waldermort25-Aug-07 14:37
Waldermort25-Aug-07 14:37 
GeneralRe: Hooking ExitProcess Pin
Richard Andrew x6425-Aug-07 15:18
professionalRichard Andrew x6425-Aug-07 15:18 
GeneralRe: Hooking ExitProcess Pin
Waldermort25-Aug-07 15:22
Waldermort25-Aug-07 15:22 
GeneralRe: Hooking ExitProcess Pin
Richard Andrew x6425-Aug-07 15:25
professionalRichard Andrew x6425-Aug-07 15:25 
GeneralRe: Hooking ExitProcess Pin
Waldermort25-Aug-07 15:29
Waldermort25-Aug-07 15:29 
GeneralRe: Hooking ExitProcess Pin
Richard Andrew x6425-Aug-07 15:23
professionalRichard Andrew x6425-Aug-07 15:23 
GeneralRe: Hooking ExitProcess Pin
Waldermort25-Aug-07 16:27
Waldermort25-Aug-07 16:27 
GeneralRe: Hooking ExitProcess Pin
Richard Andrew x6425-Aug-07 19:22
professionalRichard Andrew x6425-Aug-07 19:22 
GeneralRe: Hooking ExitProcess Pin
Waldermort26-Aug-07 0:12
Waldermort26-Aug-07 0:12 
AnswerRe: Hooking ExitProcess Pin
Naveen26-Aug-07 19:31
Naveen26-Aug-07 19:31 
GeneralRe: Hooking ExitProcess Pin
Waldermort26-Aug-07 19:43
Waldermort26-Aug-07 19:43 
GeneralRe: Hooking ExitProcess Pin
Naveen26-Aug-07 19:57
Naveen26-Aug-07 19:57 
GeneralRe: Hooking ExitProcess Pin
Waldermort26-Aug-07 20:05
Waldermort26-Aug-07 20:05 
GeneralRe: Hooking ExitProcess Pin
Naveen26-Aug-07 20:10
Naveen26-Aug-07 20:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.