Click here to Skip to main content
15,905,682 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Rookie Pin
jhwurmbach8-Dec-02 22:11
jhwurmbach8-Dec-02 22:11 
GeneralIE plugin Pin
xxhimanshu6-Dec-02 19:20
xxhimanshu6-Dec-02 19:20 
GeneralRe: IE plugin Pin
Laurent Michalkovic6-Dec-02 21:52
Laurent Michalkovic6-Dec-02 21:52 
GeneralRe: IE plugin Pin
xxhimanshu6-Dec-02 22:53
xxhimanshu6-Dec-02 22:53 
General#import directive Pin
nebbish6-Dec-02 19:02
nebbish6-Dec-02 19:02 
GeneralRe: #import directive Pin
Michael Dunn6-Dec-02 20:25
sitebuilderMichael Dunn6-Dec-02 20:25 
GeneralCListCtrl: What message to use for an event handler.. Pin
trustno16-Dec-02 17:22
trustno16-Dec-02 17:22 
GeneralRe: CListCtrl: What message to use for an event handler.. Pin
Michael Dunn6-Dec-02 20:32
sitebuilderMichael Dunn6-Dec-02 20:32 
GeneralMoving a single control in on HScroll in a CScrollView class Pin
VanHlebar6-Dec-02 16:10
VanHlebar6-Dec-02 16:10 
Questionhow to read data into an array in visual c++ Pin
KBL6-Dec-02 14:46
KBL6-Dec-02 14:46 
AnswerRe: how to read data into an array in visual c++ Pin
Christian Graus6-Dec-02 14:51
protectorChristian Graus6-Dec-02 14:51 
GeneralRe: how to read data into an array in visual c++ Pin
KBL6-Dec-02 15:16
KBL6-Dec-02 15:16 
GeneralRe: how to read data into an array in visual c++ Pin
Christian Graus6-Dec-02 15:27
protectorChristian Graus6-Dec-02 15:27 
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 

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.