Click here to Skip to main content
Licence 
First Posted 15 Jun 2002
Views 58,032
Bookmarked 30 times

Bienz.SysInfo - System Information the .NET way

By | 15 Jun 2002 | Article
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

About the Author

Jared Bienz

Web Developer

United States United States

Member

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.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralThanks Pinmembermarasinghe6:35 24 Nov '07  
QuestionSysInfo PinmemberJawz-X11:48 2 Jun '06  
Generalload icons in win32 Pinmemberhuutri7922:44 31 Oct '04  
QuestionThe source Code ? Pinmemberhugoballermann23:02 25 Sep '03  
AnswerRe: The source Code ? PinmemberJared Bienz9:19 26 Sep '03  
Generalthanks a lot PinsussAnonymous20:13 11 Nov '02  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 16 Jun 2002
Article Copyright 2002 by Jared Bienz
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid