Hi,
Is it possible for a child process to access a file which is exclusively locked by the ParentProcess.
This is how test.txt file has been given the permission
::CreateFile("C\\temp\\test.txt",
GENERIC_READ | GENERIC_WRITE,
0, // exclusive
NULL, // default security
OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
By doing this other process can not open test.txt file. Now I want to create a childProcess and I want only the child process to read "test.txt" file
This is how I am creating the childProcess:
CreateProcess("FileReader.exe",
"C:\\temp\\test.txt",
&sa,
NULL,
TRUE,
0,
NULL,
NULL,
&si,
&pi)
but it is not able to read the file.
is there anyone who can help me on this ?