Resources for IT Professionals > Forums Home > Windows Academic Forums > Windows Academic: Kernel > How to access file which is opened with exclusive access by another process
Ask a questionAsk a question
 

QuestionHow to access file which is opened with exclusive access by another process

  • Monday, March 09, 2009 8:44 AMAmrapali Nimgire Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I want my process get access to a file which is opened in exclusive mode by another process.

    Suppose a process A opens a file in exclusive mode and does some other task without releasing the file handle. Another process B wants to read this file for which it tries to get file handle using CreateFile() function.
    In process B, CreateFile() fails as process A has locked file in exclusive mode.

    I know that the Object Manager maintains a check to see that file is opened in compatible modes.
    I want to know that is there any way using which we can access the file ??-- by bypassing checks by Object Manager or some other way.

    If anyone has information about it please reply.

    Thanks.