Click here to Skip to main content
15,924,482 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Debugging Error Pin
Michael Dunn1-Aug-07 9:31
sitebuilderMichael Dunn1-Aug-07 9:31 
AnswerRe: Debugging Error Pin
Mark Salsbery1-Aug-07 9:40
Mark Salsbery1-Aug-07 9:40 
GeneralRe: Debugging Error Pin
pheven1-Aug-07 10:50
pheven1-Aug-07 10:50 
QuestionTTS SAPI5 Pin
pablov061-Aug-07 8:14
pablov061-Aug-07 8:14 
QuestionAccess Report DB Pin
mk_le1-Aug-07 8:13
mk_le1-Aug-07 8:13 
QuestionHow to copy a file opened by other process with forbidden sharing? Pin
Vlad01-Aug-07 7:48
Vlad01-Aug-07 7:48 
AnswerRe: How to copy a file opened by other process with forbidden sharing? Pin
JudyL_MD1-Aug-07 9:38
JudyL_MD1-Aug-07 9:38 
AnswerRe: How to copy a file opened by other process with forbidden sharing? Pin
Randor 1-Aug-07 10:01
professional Randor 1-Aug-07 10:01 
There is no 'friendly' way of doing it. With that being said, a hacked up way would be to use CreateRemoteThread() into a target process and force it to close the file handle. Which in turn would probably cause serious problems in the target process.

Partial pseudo-code looks something like this:

<br />
PID TargetProcess = P;<br />
HANDLE TargetHandle = H;<br />
HANDLE hProc = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ,FALSE,TargetProcess);<br />
HMODULE hMod = LoadLibrary(_T("kernel32.dll"));<br />
DWORD rc;<br />
CreateRemoteThread(hProc,0,0,(__stdcall *)(void*)GetProcAddress(hMod,"CloseHandle"),TargetHandle,0,&rc );<br />


Best Wishes,
-Randor
GeneralRe: How to copy a file opened by other process with forbidden sharing? Pin
Vlad02-Aug-07 8:29
Vlad02-Aug-07 8:29 
GeneralRe: How to copy a file opened by other process with forbidden sharing? [modified] Pin
Vlad022-Aug-07 7:54
Vlad022-Aug-07 7:54 
AnswerRe: How to copy a file opened by other process with forbidden sharing? Pin
Peter Weyzen1-Aug-07 21:16
Peter Weyzen1-Aug-07 21:16 
GeneralRe: How to copy a file opened by other process with forbidden sharing? Pin
Vlad02-Aug-07 5:14
Vlad02-Aug-07 5:14 
Questionbetter way for executing system commands [modified] Pin
koumodaki1-Aug-07 6:30
koumodaki1-Aug-07 6:30 
AnswerRe: better way for executing system commands Pin
_AnsHUMAN_ 1-Aug-07 7:12
_AnsHUMAN_ 1-Aug-07 7:12 
AnswerRe: better way for executing system commands Pin
James R. Twine1-Aug-07 7:23
James R. Twine1-Aug-07 7:23 
AnswerRe: better way for executing system commands Pin
David Crow1-Aug-07 7:27
David Crow1-Aug-07 7:27 
QuestionUtilizing resource files Pin
Torus_XL1-Aug-07 5:50
Torus_XL1-Aug-07 5:50 
AnswerRe: Utilizing resource files Pin
toxcct1-Aug-07 5:57
toxcct1-Aug-07 5:57 
GeneralRe: Utilizing resource files Pin
Torus_XL1-Aug-07 6:01
Torus_XL1-Aug-07 6:01 
GeneralRe: Utilizing resource files Pin
toxcct1-Aug-07 7:01
toxcct1-Aug-07 7:01 
GeneralRe: Utilizing resource files Pin
Randor 1-Aug-07 7:05
professional Randor 1-Aug-07 7:05 
AnswerRe: Utilizing resource files Pin
David Crow1-Aug-07 7:35
David Crow1-Aug-07 7:35 
AnswerRe: Utilizing resource files Pin
Torus_XL1-Aug-07 9:05
Torus_XL1-Aug-07 9:05 
QuestionVC 2005 Pin
ArielR1-Aug-07 5:34
ArielR1-Aug-07 5:34 
AnswerRe: VC 2005 Pin
toxcct1-Aug-07 5:44
toxcct1-Aug-07 5:44 

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.