Click here to Skip to main content
Click here to Skip to main content

Bienz.SysInfo - System Information the .NET way

, 15 Jun 2002
Rate this:
Please Sign up or sign in to vote.
A library that assists in gathering system information such as disk volumes, labels and even disk icons.
Sample Image Bienz.SysInfo

Preface

I have noticed other articles where users are attempting to gain access to system information available only via old Win32 APIs. Although it is easy enough to obtain this information, I have noticed it occurring rather frequently.

This library was developed to group some of these APIs and make them more accessible in the .NET way - the way I feel Microsoft should have included them in the first place.

As of the writing of this article, the only class in the library deals with storage APIs. I plan to eventually expand this library to deal with many other system APIs. Currently, Bienz.SysInfo provides access to the following information:

  • Volume Type (Removable, Fixed, Remote / Network, CD-ROM, RAMDisk, etc.)
  • Volume Label
  • Volume Serial Number
  • UNC Network Path (even if constructed from mapped drive letter)
  • Large Icon as presented by the Shell (32x32)
  • Small Icon as presented by the Shell (16x16)
  • Supporting Properties (such as SupportsCompression and SupportsEncryption)

The VolumeInfo Class

Public Static (Shared) Properties

  • CurrentVolume

Public Instance Properties

  • CaseSensitive
  • Compressed
  • Flags
  • Label
  • LargeIcon
  • MaxComponentLen
  • PersistentACLS
  • PreservesCase
  • ReadOnly
  • SerialNumber
  • SmallIcon
  • SupportsEncryption
  • SupportsFileCompression
  • SupportsNamedStreams
  • SupportsObjectIDs
  • SupportsQuotas
  • SupportsReparsePoints
  • SupportsSparseFiles
  • SupportsUnicodeOnVolume
  • UncPath
  • Uri
  • VolumeType

VolumeFlags enumeration

  • Unknown
  • CaseSensitive
  • Compressed
  • PersistentACLS
  • PreservesCase
  • ReadOnly
  • SupportsEncryption
  • SupportsFileCompression
  • SupportsNamedStreams
  • SupportsObjectIDs
  • SupportsQuotas
  • SupportsReparsePoints
  • SupportsSparseFiles
  • SupportsUnicodeOnVolume

VolumeTypes enumeration

  • Unknown
  • Invalid
  • Removable
  • Fixed
  • Remote
  • CDROM
  • RAMDisk

For an example use of this library, please check out my Bienz.UI library. Bienz.UI includes a drive drop-down control that displays all drives in the system as well as their labels and icons. The SelectedItem property of this control returns an instance of the VolumeInformation class from Bienz.SysInfo.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jared Bienz
Web Developer
United States United States
I live in Houston Texas and coding is my hobby. I am happily employed with a well-known computer software company.
 
My web address is: http://www.bienz.com and my e-mail is jared@bienz.com.

Comments and Discussions

 
GeneralThanks Pinmembermarasinghe24-Nov-07 6:35 
QuestionSysInfo PinmemberJawz-X2-Jun-06 11:48 
Generalload icons in win32 Pinmemberhuutri7931-Oct-04 22:44 
QuestionThe source Code ? Pinmemberhugoballermann25-Sep-03 23:02 
AnswerRe: The source Code ? PinmemberJared Bienz26-Sep-03 9:19 
Generalthanks a lot PinsussAnonymous11-Nov-02 20:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 16 Jun 2002
Article Copyright 2002 by Jared Bienz
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid