Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MultiThread and Multi DC Pin
Roger Stoltz13-Feb-09 5:34
Roger Stoltz13-Feb-09 5:34 
GeneralRe: MultiThread and Multi DC Pin
Max++13-Feb-09 6:32
Max++13-Feb-09 6:32 
AnswerRe: MultiThread and Multi DC Pin
Roger Stoltz13-Feb-09 23:43
Roger Stoltz13-Feb-09 23:43 
GeneralRe: MultiThread and Multi DC Pin
Max++14-Feb-09 2:47
Max++14-Feb-09 2:47 
AnswerRe: MultiThread and Multi DC Pin
Roger Stoltz14-Feb-09 15:15
Roger Stoltz14-Feb-09 15:15 
GeneralRe: MultiThread and Multi DC Pin
Max++14-Feb-09 17:25
Max++14-Feb-09 17:25 
QuestionNetFileEnum and GetLastError 997 Pin
aks.13-Feb-09 3:02
aks.13-Feb-09 3:02 
QuestionRe: NetFileEnum and GetLastError 997 Pin
David Crow13-Feb-09 5:50
David Crow13-Feb-09 5:50 
QuestionNeed help on how to set DDX control for dynamically created slider Pin
John50213-Feb-09 1:21
John50213-Feb-09 1:21 
AnswerRe: Need help on how to set DDX control for dynamically created slider Pin
Code-o-mat13-Feb-09 1:35
Code-o-mat13-Feb-09 1:35 
GeneralRe: Need help on how to set DDX control for dynamically created slider Pin
John50213-Feb-09 2:25
John50213-Feb-09 2:25 
GeneralRe: Need help on how to set DDX control for dynamically created slider Pin
Code-o-mat13-Feb-09 2:29
Code-o-mat13-Feb-09 2:29 
GeneralRe: Need help on how to set DDX control for dynamically created slider Pin
John50214-Feb-09 5:10
John50214-Feb-09 5:10 
GeneralRe: Need help on how to set DDX control for dynamically created slider Pin
Code-o-mat15-Feb-09 1:21
Code-o-mat15-Feb-09 1:21 
QuestionIntercept drop file operations between two explorers Pin
Nuno Esculcas13-Feb-09 1:20
Nuno Esculcas13-Feb-09 1:20 
AnswerRe: Intercept drop file operations between two explorers Pin
Sarath C13-Feb-09 1:38
Sarath C13-Feb-09 1:38 
GeneralRe: Intercept drop file operations between two explorers Pin
Nuno Esculcas13-Feb-09 7:29
Nuno Esculcas13-Feb-09 7:29 
GeneralRe: Intercept drop file operations between two explorers Pin
Sarath C15-Feb-09 17:12
Sarath C15-Feb-09 17:12 
AnswerRe: Intercept drop file operations between two explorers Pin
Code-o-mat13-Feb-09 2:10
Code-o-mat13-Feb-09 2:10 
GeneralRe: Intercept drop file operations between two explorers Pin
Nuno Esculcas13-Feb-09 7:31
Nuno Esculcas13-Feb-09 7:31 
GeneralRe: Intercept drop file operations between two explorers Pin
Code-o-mat13-Feb-09 8:08
Code-o-mat13-Feb-09 8:08 
GeneralRe: Intercept drop file operations between two explorers Pin
Nuno Esculcas16-Feb-09 9:31
Nuno Esculcas16-Feb-09 9:31 
Hi, thanks for the suggestion, but the DoDragDrop is only called on the begining of the drag and drop process. And i will never known where is the source and if is a move or copy operation.

I tried to hook the SHFileOperationW and i can get all the things that i needed, but the problem is that the FO_DELETE operation allways crash the explorer process, even if i don't have any code inside my hook function implementation:

int MySHFileOperation(LPSHFILEOPSTRUCT lpFileOp)
{
VirtualProtect((LPVOID)pOrigSHFOPAddress, SIZE, myProtect, NULL); //ReadWrite again
memcpy(pOrigSHFOPAddress, oldBytes, SIZE); //Unhook API

int nRes = SHFileOperation(lpFileOp);

memcpy(pOrigSHFOPAddress, JMP, SIZE); //Rehook API
VirtualProtect((LPVOID)pOrigSHFOPAddress, SIZE, oldProtect, NULL); //Normal setts

return nRes;
}

PS: i used the technique described by AlexAbramov in "API Hooking with MS Detours" without the detours Smile | :)

I think i will try another approach for my problem... there are a few problems with the hook approach, one is that the SHFileOperation is deprecated in vista, and another i think that this approach is a little unorthodox..

So i will try to find another way of doing this, if anyone has some better suggestion please feel free to post it Smile | :)
Thanks

Nuno

QuestionDrawing huge Views Pin
baerten13-Feb-09 0:07
baerten13-Feb-09 0:07 
AnswerRe: Drawing huge Views Pin
«_Superman_»13-Feb-09 0:28
professional«_Superman_»13-Feb-09 0:28 
GeneralRe: Drawing huge Views Pin
baerten13-Feb-09 0:35
baerten13-Feb-09 0:35 

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.