Click here to Skip to main content
15,915,093 members
Home / Discussions / C#
   

C#

 
GeneralRe: GDI+ nonrectangular forms problem Pin
Heath Stewart23-Dec-04 5:29
protectorHeath Stewart23-Dec-04 5:29 
GeneralBinding DataGrid with Database Pin
T i T i20-Dec-04 21:50
T i T i20-Dec-04 21:50 
GeneralRe: Binding DataGrid with Database Pin
Heath Stewart20-Dec-04 22:13
protectorHeath Stewart20-Dec-04 22:13 
GeneralDisplay formatted xml document in richtextbox Pin
CNU20-Dec-04 20:50
CNU20-Dec-04 20:50 
GeneralTcpChannel and authentication Pin
Bjoern.adG20-Dec-04 20:39
Bjoern.adG20-Dec-04 20:39 
GeneralRe: TcpChannel and authentication Pin
Skynyrd20-Dec-04 21:06
Skynyrd20-Dec-04 21:06 
GeneralExtending Folder properties Pin
umeshb20-Dec-04 20:02
umeshb20-Dec-04 20:02 
GeneralRe: Extending Folder properties Pin
Heath Stewart20-Dec-04 21:58
protectorHeath Stewart20-Dec-04 21:58 
Whether or not it's possible has little to nothing to do with the language or framework. The file system does not expose an extensible system for defining properties for folders, though there is support using OLE streams for files. Windows NT provides a default OLE stream implementation for the "\005SummaryInformation" stream, while some formats - like Word Documents, MP3s, etc. - support their own implementation through a persistent file handler configured in the registry for that file class.

All this functionality is defined natively, however, and requires that you P/Invoke the necessary native APIs and define managed versions of native COM interfaces (using the ComImportAttributE, InterfaceTypeAttribute, and GuidAttribute). There are projects documented here on CodeProject for doing just that.

For information about OLE streams and the "\005SummaryInformation" stream, I suggest you start by reading Properties and Property Sets[^].

To note, the default implementation that you see under the "Summary" tab in Windows Explorer for file properties uses alternative NTFS data streams. Custom handlers like that for Word actually store the information in the Word Document itself, which is how Windows 9X can see them, since Widnows 9X supports neither NTFS or alternative data streams (which is specific to NTFS). For MP3 files, for example, this information is reflected by the ID3 tags embedded in the MP3 file itself.

The documentation above references the native API functions and COM interfaces you need, and there's quite a bit. Just declaring these isn't enough, however, since you need to understand what an OLE stream is and how to access it. There are a couple different types of storage mediums, like IStorage and IStream. Streams (IStream) may actually be contained within a compound storage structure (IStorage), so checks are necessary to determine how you parse extended information.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
QuestionMultiligual and End-User defined labels...? Pin
Darren Weir20-Dec-04 18:35
Darren Weir20-Dec-04 18:35 
AnswerRe: Multiligual and End-User defined labels...? Pin
Sven Cipido20-Dec-04 20:29
Sven Cipido20-Dec-04 20:29 
GeneralRe: Multiligual and End-User defined labels...? Pin
Darren Weir20-Dec-04 23:42
Darren Weir20-Dec-04 23:42 
AnswerRe: Multiligual and End-User defined labels...? Pin
Heath Stewart20-Dec-04 21:46
protectorHeath Stewart20-Dec-04 21:46 
GeneralRe: Multiligual and End-User defined labels...? Pin
Darren Weir20-Dec-04 23:57
Darren Weir20-Dec-04 23:57 
GeneralRe: Multiligual and End-User defined labels...? Pin
Sven Cipido21-Dec-04 1:11
Sven Cipido21-Dec-04 1:11 
GeneralRe: Multiligual and End-User defined labels...? Pin
Heath Stewart21-Dec-04 7:46
protectorHeath Stewart21-Dec-04 7:46 
Generalon SQL Server CE Pin
ting66820-Dec-04 17:39
ting66820-Dec-04 17:39 
GeneralRe: on SQL Server CE Pin
Heath Stewart20-Dec-04 21:21
protectorHeath Stewart20-Dec-04 21:21 
GeneralExtend window control as custom control problem Pin
ting66820-Dec-04 17:19
ting66820-Dec-04 17:19 
GeneralRe: Extend window control as custom control problem Pin
Heath Stewart20-Dec-04 21:30
protectorHeath Stewart20-Dec-04 21:30 
GeneralPlatform independant... Pin
Malcolm Smart20-Dec-04 10:45
Malcolm Smart20-Dec-04 10:45 
GeneralRe: Platform independant... Pin
Nick Parker20-Dec-04 10:55
protectorNick Parker20-Dec-04 10:55 
GeneralSerializing the Forms Pin
Wail A.Salem20-Dec-04 10:28
Wail A.Salem20-Dec-04 10:28 
GeneralRe: Serializing the Forms Pin
Heath Stewart20-Dec-04 21:34
protectorHeath Stewart20-Dec-04 21:34 
GeneralDataGrid DoublClick dos'nt Response Pin
Wail A.Salem20-Dec-04 10:21
Wail A.Salem20-Dec-04 10:21 
GeneralRe: DataGrid DoublClick dos'nt Response Pin
Jay Shankar20-Dec-04 17:20
Jay Shankar20-Dec-04 17:20 

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.