process file handles
-
I'm trying to find a way of getting a list of files which are locked by other processes. I'm sure this can be done in .net without resorting to win32 api calls, but without spending days drilling into MSDN I'm hoping that someone already has an answer for vb.net 2.0 if poss. http://www.ViSYNERGY.com End of Line.
-
I'm trying to find a way of getting a list of files which are locked by other processes. I'm sure this can be done in .net without resorting to win32 api calls, but without spending days drilling into MSDN I'm hoping that someone already has an answer for vb.net 2.0 if poss. http://www.ViSYNERGY.com End of Line.
Arkett wrote:
I'm sure this can be done in .net without resorting to win32 api calls
No, it can't. There is no support built into the .NET BCL to do anything close to this. You MUST start calling into Win32. I take it you've already found an example and didn't like what you saw? Dave Kreskowiak Microsoft MVP - Visual Basic
-
Arkett wrote:
I'm sure this can be done in .net without resorting to win32 api calls
No, it can't. There is no support built into the .NET BCL to do anything close to this. You MUST start calling into Win32. I take it you've already found an example and didn't like what you saw? Dave Kreskowiak Microsoft MVP - Visual Basic
Please don't reply to this thread telling me what I can't do if you're not going to follow it up by telling me what I can do. It's just a waste of your time and mine. http://www.ViSYNERGY.com End of Line.
-
Please don't reply to this thread telling me what I can't do if you're not going to follow it up by telling me what I can do. It's just a waste of your time and mine. http://www.ViSYNERGY.com End of Line.
Arkett wrote:
Please don't reply to this thread telling me what I can't do if you're not going to follow it up by telling me what I can do.
First, you haven't answered my question in my original reply. Second, I did at least partially answer your question. There is absolutely no support in the .NET Framework for what you want to do. Now, having said that, it narrows down your search parameters. Lastly, sorry, but I must have left out the part about "Now you can Google for it yourself using the narrowed down parameters of "process open files"! Dave Kreskowiak Microsoft MVP - Visual Basic
-
I'm trying to find a way of getting a list of files which are locked by other processes. I'm sure this can be done in .net without resorting to win32 api calls, but without spending days drilling into MSDN I'm hoping that someone already has an answer for vb.net 2.0 if poss. http://www.ViSYNERGY.com End of Line.
This has been something of an object lesson in futility. At the beginging of this exploration I had entertained hopes for the system.diagnostics.process class, but I now know that although I can get a good deal of information about running processes, including a handles count, a list of open file handles is not available. More research has concluded that the functionality I'm trying to expose in my programme is only available via the NT Native API, which is way beyond the scope of anything I can hope to achieve at the moment. I have spent two days googling till I'm blue in the mouth and trawling up and down inside MSDN and got nowhere. I did however get a few insights into some interesting things which may well be useful in the future, so it hasn't been a complete waste of time. Thanks to Dave Kreskowiak for - well nothing very much. TTFN http://www.ViSYNERGY.com End of Line.