Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2005, 08:35 AM
Authorized User
Points: 382, Level: 6
Points: 382, Level: 6 Points: 382, Level: 6 Points: 382, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Rawalpindi, -, Pakistan.
Posts: 73
Thanks: 0
Thanked 1 Time in 1 Post
Default Know about a running process for a given resource

Hi guys,

Anybody knows about how to get to know about the OS process under which a given resource (e.g, a disk file) is in use? I am working in Windows .NET app, however no matter if the code example uses Windows APIs in language like vb/vc++. This is very important for me so early rply will be highly appreciated. thanx in advance.

BaburMan
__________________
BaburMan
Reply With Quote
  #2 (permalink)  
Old June 9th, 2005, 07:03 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you specifically looking for a way to monitor changes to a file? There are classes that provide file watching capabilities in .NET.

-Peter
Reply With Quote
  #3 (permalink)  
Old October 13th, 2005, 03:04 AM
Authorized User
Points: 382, Level: 6
Points: 382, Level: 6 Points: 382, Level: 6 Points: 382, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Rawalpindi, -, Pakistan.
Posts: 73
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sorry for the late reply, i was busy in some other tasks and in the meantime i have also been trying to get solution from Win32 APIs. Let me explain it in some details. I have placed a
web browse control in my Windows Form in order to show many types of documents like word doc,
text file, ms excel sheet, images or even flash animation etc. There are three panels in this
Form. On the left panel there's a Directory tree just like we see in Windows Explorer. The Top panel contains a list of documents in the currently selected directory. I have placed the web
browser control in the third panle which is right below the top panel. When the user selects
a document (word, excel etc.) it is opened and viewed in the browser control. So far so good.
Now the problem occurs when the user selects a document and it opens for view and he
wants to delete it by using the shortcut menu option which is provided by me. The system throws
an exception when i attempt to delete this document from the os directory and says like "The file is in use by another process.". This occurs even if the user selects another document and the
application attempts to delete the 'previously' selected document again. This is for sure that
the process which is running my app has not yet destroyed the handle of the document, but i
don't know how to destory it in order to delete the file.



BaburMan
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get running Instance of a Process not in ROT? scando C# 1 February 20th, 2018 01:06 PM
process.startinfo opens new instance of process Anypond General .NET 0 August 28th, 2008 05:35 AM
Finding commandline arguments of a running process EddyT C# 4 July 1st, 2007 10:07 AM
Resource File kk_kumar99 Beginning VB 6 3 October 23rd, 2006 04:32 AM
The resource cannot be found. ltdanp21 Dreamweaver (all versions) 2 July 21st, 2004 02:04 AM



All times are GMT -4. The time now is 03:39 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.