C# sharp ability to append information to a file saved in any wind

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to find out if C# has the ability to tie into windows so that
when a user tries to save a file from any windows application a save as
dialog box opens that is written in c# with other save properties such as
owner, person saving, notes etc.. that are not normally part of the save
process.

Basically instead of using the normal windows dialog box to save a file i
want to use a c# coded box that writes extra information to the file.

Just wondering if this is even possible and if anyone can point me in the
right direction i would really appreciate it. Thanks everyone.

-Jason
 
Jason,

I don't think that this is possible on a system-wide basis. I know that
the file dialogs can be changed on an application-basis.

The problem here is that not all applications would know what to do with
the information. Where is this information going to be stored? The
application has to know to associate it with the file (I seem to think there
is something in Windows that will allow you to append this extra
information, but I don't know).

If this is possible at all, it would be through COM interop, most
likely. I would check out the Shell Reference, since that is where things
of this nature are addressed (things like namespace extensions and whatnot).

Hope this helps.
 
Thanks Nicholas,

I figured it was probaly impossible. I was looking for a way around
having to buy a documnet manager software like sharepoint. You answered my
question and I appreciate your time in responding.



Nicholas Paldino said:
Jason,

I don't think that this is possible on a system-wide basis. I know that
the file dialogs can be changed on an application-basis.

The problem here is that not all applications would know what to do with
the information. Where is this information going to be stored? The
application has to know to associate it with the file (I seem to think there
is something in Windows that will allow you to append this extra
information, but I don't know).

If this is possible at all, it would be through COM interop, most
likely. I would check out the Shell Reference, since that is where things
of this nature are addressed (things like namespace extensions and whatnot).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

rip_tide said:
I am trying to find out if C# has the ability to tie into windows so that
when a user tries to save a file from any windows application a save as
dialog box opens that is written in c# with other save properties such as
owner, person saving, notes etc.. that are not normally part of the save
process.

Basically instead of using the normal windows dialog box to save a file i
want to use a c# coded box that writes extra information to the file.

Just wondering if this is even possible and if anyone can point me in the
right direction i would really appreciate it. Thanks everyone.

-Jason
 
Hello,

like Nicholas, I don't think it is possible to have a solution to this
problem on a system-wide basis. Okay, it might be possible, but would
require *a lot* of tinkering.

However, another possible route towards the solution comes into mind: you
could monitor for file creation (using for example the .NET
FileSystemWatcher component), and whenever a new file is created, then you
could append the data to the file itself, or to an "alternative NTFS file
stream".

If such streams are a new concept to you, then here's a short intro by Dino
Esposito:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/ntfs5.asp

Essentially, they are additional sets of data that can be associated to any
file on an NTFS partition. But that's a different thing than those file
properties that Word, Excel, etc. display.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
Back
Top