.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> C# >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Get Modem Information Using C#

Posted By:Hiren Soni       Posted Date: August 05, 2010    Points: 25    Category: C#    URL: http://www.dotnetspark.com  

here i will show how to get information using Win32_POTSModem WMI class and C#
 

Here I will show you how you can get modem information using WMI and C#

Create new project - > now add reference  System.Management;

Code is:


using System.Management;


 ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_POTSModem");


 foreach (ManagementObject mo in mos.Get())
 {
 listBox1.Items.Add(mo["Caption"].ToString());

 }


If you use caption here, it will show the name of modem
If you want to get more information , you can use below words instead of caption

ReturnType propertyName
uint16 AnswerMode;
string AttachedTo;
uint16 Availability;
string BlindOff;
string BlindOn;
string Caption;
string CompatibilityFlags;
uint16 CompressionInfo;
string CompressionOff;
string CompressionOn;
uint32 ConfigManagerErrorCode;
boolean ConfigManagerUserConfig;
string ConfigurationDialog;
string CountriesSupported[];
string CountrySelected;
string CreationClassName;
string CurrentPasswords[];
uint8 DCB[];
uint8 Default[];
string Description;
string DeviceID;
string DeviceLoader;
string DeviceType;
uint16 DialType;
datetime DriverDate;
boolean ErrorCleared;
string ErrorControlForced;
uint16 ErrorControlInfo;
string ErrorControlOff;
string ErrorControlOn;
string ErrorDescription;
string FlowControlHard;
string FlowControlOff;
string FlowControlSoft;
string InactivityScale;
uint32 InactivityTimeout;
uint32 Index;
datetime InstallDate;
uint32 LastErrorCode;
uint32 MaxBaudRateToPhone;
uint32 MaxBaudRateToSerialPort;
uint16 MaxNumberOfPasswords;
string Model;
string ModemInfPath;
string ModemInfSection;
string ModulationBell;
string ModulationCCITT;
uint16 ModulationScheme;
string Name;
string PNPDeviceID;
string PortSubClass;
uint16 PowerManagementCapabilities[];
boolean PowerManagementSupported;
string Prefix;
uint8 Properties[];
string ProviderName;
string Pulse;
string Reset;
string ResponsesKeyName;
uint8 RingsBeforeAnswer;
string SpeakerModeDial;
string SpeakerModeOff;
string SpeakerMode



 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend