Click here to Skip to main content
15,921,052 members
Home / Discussions / C#
   

C#

 
AnswerRe: Self-updating application by using batch files (Need Help) Pin
Giorgi Dalakishvili10-May-09 7:00
mentorGiorgi Dalakishvili10-May-09 7:00 
GeneralRe: Self-updating application by using batch files (Need Help) Pin
SimpleData10-May-09 7:22
SimpleData10-May-09 7:22 
Questionmultine textbox maxlenght depending of height and widht control Pin
ramaluciano10-May-09 4:39
ramaluciano10-May-09 4:39 
AnswerRe: multine textbox maxlenght depending of height and widht control Pin
Henry Minute10-May-09 5:13
Henry Minute10-May-09 5:13 
GeneralRe: multine textbox maxlenght depending of height and widht control Pin
ramaluciano10-May-09 5:45
ramaluciano10-May-09 5:45 
GeneralRe: multine textbox maxlenght depending of height and widht control Pin
Henry Minute10-May-09 6:37
Henry Minute10-May-09 6:37 
Questionprocess modifying/openning file Pin
lost_in_code10-May-09 2:27
lost_in_code10-May-09 2:27 
AnswerRe: process modifying/openning file Pin
Dave Kreskowiak10-May-09 6:04
mveDave Kreskowiak10-May-09 6:04 
lost_in_code wrote:
i want to know how to get the file name currently being modified/openned by certain proc


Unless the process exposes some kind of ommunication mechanism, there's no way to tell.


lost_in_code wrote:
i know about FileSystemWatcher tool


The FSW won't work for you anyway since it can't tell that a file was opened at all. All it can see is the changes in the files timestamp attributes, which don't change if you open a file for read access.

lost_in_code wrote:
i want to get it in another way(i mean what process x is openning or modifying at a specific moment).


The only way I can think of would be to enumerate all the process handles, and all of the file handles in the system and start trying to match them up with each other. But, there is no way to tell an .EXE file from a .DLL file from a .TXT file from a .DOC file, or any other file type. On top of that, most apps out there don't hold files open when they load them, so there's no file handle to try and match up anyway.

The bottom line is what you want to do is extremely difficult and unreliable.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




Questionconverting the numeric value to text Pin
jaillani khan10-May-09 2:26
jaillani khan10-May-09 2:26 
AnswerRe: converting the numeric value to text Pin
Luc Pattyn10-May-09 2:34
sitebuilderLuc Pattyn10-May-09 2:34 
GeneralRe: converting the numeric value to text Pin
jaillani khan10-May-09 8:22
jaillani khan10-May-09 8:22 
QuestionNew form variables passing Pin
michaelgr110-May-09 1:15
michaelgr110-May-09 1:15 
AnswerRe: New form variables passing Pin
Henry Minute10-May-09 1:26
Henry Minute10-May-09 1:26 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 1:34
michaelgr110-May-09 1:34 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 1:37
Henry Minute10-May-09 1:37 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 1:47
michaelgr110-May-09 1:47 
GeneralRe: New form variables passing Pin
Colin Angus Mackay10-May-09 3:22
Colin Angus Mackay10-May-09 3:22 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 3:52
michaelgr110-May-09 3:52 
GeneralRe: New form variables passing Pin
N a v a n e e t h10-May-09 4:34
N a v a n e e t h10-May-09 4:34 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 5:09
Henry Minute10-May-09 5:09 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 6:47
michaelgr110-May-09 6:47 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 6:58
Henry Minute10-May-09 6:58 
GeneralRe: New form variables passing Pin
michaelgr110-May-09 7:04
michaelgr110-May-09 7:04 
GeneralRe: New form variables passing Pin
Henry Minute10-May-09 7:23
Henry Minute10-May-09 7:23 
Questionhow to update the datas present in textbox to gridview control (gui) ,SQL2005 Pin
Mads11510-May-09 0:42
Mads11510-May-09 0:42 

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.