Click here to Skip to main content
15,896,349 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to read data into an array in visual c++ Pin
KBL6-Dec-02 16:10
KBL6-Dec-02 16:10 
GeneralRe: how to read data into an array in visual c++ Pin
Nitron7-Dec-02 4:50
Nitron7-Dec-02 4:50 
QuestionFiles: What is more efficient? Pin
AlexMarbus6-Dec-02 12:51
AlexMarbus6-Dec-02 12:51 
AnswerRe: Files: What is more efficient? Pin
Nitron6-Dec-02 13:36
Nitron6-Dec-02 13:36 
GeneralRe: Files: What is more efficient? Pin
AlexMarbus6-Dec-02 13:37
AlexMarbus6-Dec-02 13:37 
AnswerRe: Files: What is more efficient? Pin
Michael Dunn6-Dec-02 14:13
sitebuilderMichael Dunn6-Dec-02 14:13 
GeneralRe: Files: What is more efficient? Pin
AlexMarbus6-Dec-02 14:19
AlexMarbus6-Dec-02 14:19 
QuestionHow to tell if a file is opened? Pin
Jonathan Gilligan6-Dec-02 12:34
Jonathan Gilligan6-Dec-02 12:34 
Is there a good way to tell whether some process has a given file open.

I am writing an application that allows the user to open a file in an arbitrary external editor. I start the editor in a spawned process with P_NOWAIT or P_DETACH flags, and want to figure out whether the editor has closed the file. Since the user can arbitrarily choose the editor, I can't make any assumptions about DDE or similar calls to the editor to query the status of the file.

The user may close the file in the editor without closing the editor, so I can't simply check whether the given PID has exited.

Thus, my question is: given a PID (process id) and a filename (full path), is there a Win32 API method of determining whether the process PID currently has the given file open?

Thanks,
Jonathan

Why couldn't Science, in the long run, serve
As well as one's uncleared lunch-table or
Mme X en Culottes de Matador?     James Merrill

AnswerRe: How to tell if a file is opened? Pin
Ravi Bhavnani6-Dec-02 13:06
professionalRavi Bhavnani6-Dec-02 13:06 
GeneralRe: How to tell if a file is opened? Pin
Jonathan Gilligan6-Dec-02 13:27
Jonathan Gilligan6-Dec-02 13:27 
GeneralMystery Progress Bars in Shell Context Menu Extension DLL Pin
Sheri Steeves6-Dec-02 11:28
Sheri Steeves6-Dec-02 11:28 
GeneralRestore focus to child window in CScrollView Pin
Sara Burns6-Dec-02 10:54
Sara Burns6-Dec-02 10:54 
GeneralWindows 2000 VS. NT Pin
Shay Harel6-Dec-02 10:41
Shay Harel6-Dec-02 10:41 
QuestionWhen do you build a DLL? Pin
Nitron6-Dec-02 10:16
Nitron6-Dec-02 10:16 
AnswerRe: When do you build a DLL? Pin
Paul M Watt6-Dec-02 10:24
mentorPaul M Watt6-Dec-02 10:24 
GeneralRe: When do you build a DLL? Pin
Nitron6-Dec-02 10:40
Nitron6-Dec-02 10:40 
GeneralRe: When do you build a DLL? Pin
Paul M Watt6-Dec-02 10:47
mentorPaul M Watt6-Dec-02 10:47 
GeneralRe: When do you build a DLL? Pin
Nitron6-Dec-02 10:56
Nitron6-Dec-02 10:56 
Generalcompilation error of the day ... Pin
Maximilien6-Dec-02 9:47
Maximilien6-Dec-02 9:47 
GeneralRe: compilation error of the day ... Pin
Alvaro Mendez6-Dec-02 9:58
Alvaro Mendez6-Dec-02 9:58 
GeneralRe: compilation error of the day ... Pin
Maximilien6-Dec-02 10:31
Maximilien6-Dec-02 10:31 
GeneralRe: compilation error of the day ... Pin
Michael Dunn6-Dec-02 16:44
sitebuilderMichael Dunn6-Dec-02 16:44 
GeneralHelp File Pin
act_x6-Dec-02 8:55
act_x6-Dec-02 8:55 
GeneralRe: Help File Pin
lucy6-Dec-02 9:33
lucy6-Dec-02 9:33 
GeneralRe: Help File Pin
act_x6-Dec-02 9:43
act_x6-Dec-02 9:43 

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.