Click here to Skip to main content
15,559,819 members
Home / Discussions / C#
   

C#

 
QuestionRegistering COM+ Assembly Error Pin
Member 813710526-Jun-12 10:37
Member 813710526-Jun-12 10:37 
AnswerRe: Registering COM+ Assembly Error Pin
Richard Andrew x6426-Jun-12 12:48
professionalRichard Andrew x6426-Jun-12 12:48 
GeneralRe: Registering COM+ Assembly Error Pin
Member 81371056-Jul-12 6:16
Member 81371056-Jul-12 6:16 
AnswerRe: Registering COM+ Assembly Error Pin
Member 813710513-Jul-12 4:47
Member 813710513-Jul-12 4:47 
GeneralSql Update Pin
Member 771897926-Jun-12 9:53
Member 771897926-Jun-12 9:53 
GeneralRe: Sql Update Pin
PIEBALDconsult26-Jun-12 10:25
professionalPIEBALDconsult26-Jun-12 10:25 
QuestionHow to check for a driver in C#? Pin
glennPattonWork326-Jun-12 4:47
professionalglennPattonWork326-Jun-12 4:47 
AnswerRe: How to check for a driver in C#? Pin
Alan N26-Jun-12 6:49
Alan N26-Jun-12 6:49 
I've used System.ServiceProcess.ServiceController for this in the past.

For everything it's this:
C#
using System.ServiceProcess;

private static void Devices() {
  ServiceController[] scDevices = ServiceController.GetDevices();

  Console.WriteLine("Device driver services on the local computer");

  foreach (ServiceController scTemp in scDevices) {
    Console.WriteLine("{0, -25} {1, -20} {2}",
      scTemp.ServiceType, scTemp.ServiceName, scTemp.DisplayName);
  }
}


And to hone in on a single target:
C#
private static void SpecificService(String name){
  try {
    ServiceController sc = new ServiceController(name);
    Console.WriteLine("{0, -25} {1, -20} {2}",
      sc.ServiceType, sc.ServiceName, sc.DisplayName);
  } catch (InvalidOperationException) {
    Console.WriteLine(name + " service not found");
  }
}


I have the Prolific driver installed, for which SpecificService("ser2pl") gives
KernelDriver              ser2pl               Prolific Serial port driver

Alan
GeneralRe: How to check for a driver in C#? Pin
glennPattonWork326-Jun-12 6:58
professionalglennPattonWork326-Jun-12 6:58 
GeneralRe: How to check for a driver in C#? Pin
Alan N26-Jun-12 7:44
Alan N26-Jun-12 7:44 
GeneralRe: How to check for a driver in C#? Pin
glennPattonWork326-Jun-12 23:21
professionalglennPattonWork326-Jun-12 23:21 
Questionkeycode Pin
a.fatemeh26-Jun-12 2:16
a.fatemeh26-Jun-12 2:16 
QuestionHow to retrieve a list of active computers in a LAN? Pin
asdf900926-Jun-12 0:47
asdf900926-Jun-12 0:47 
AnswerRe: How to retrieve a list of active computers in a LAN? Pin
Sandeep Mewara26-Jun-12 1:49
mveSandeep Mewara26-Jun-12 1:49 
QuestionSearch String for SQL Server Pin
FredS225-Jun-12 22:40
FredS225-Jun-12 22:40 
AnswerRe: Search String for SQL Server Pin
Dave Kreskowiak26-Jun-12 3:08
mveDave Kreskowiak26-Jun-12 3:08 
GeneralRe: Search String for SQL Server Pin
FredS226-Jun-12 4:49
FredS226-Jun-12 4:49 
AnswerRe: Search String for SQL Server Pin
Abhinav S26-Jun-12 3:34
Abhinav S26-Jun-12 3:34 
QuestionNeed a multilingual virtual keyboard. Simulating key action using virtual key codes. Unable to generate accented charcacters Pin
revengeoffallen25-Jun-12 20:12
revengeoffallen25-Jun-12 20:12 
AnswerRe: Need a multilingual virtual keyboard. Simulating key action using virtual key codes. Unable to generate accented charcacters Pin
Richard MacCutchan25-Jun-12 23:09
mveRichard MacCutchan25-Jun-12 23:09 
GeneralRe: Need a multilingual virtual keyboard. Simulating key action using virtual key codes. Unable to generate accented charcacters Pin
revengeoffallen26-Jun-12 2:53
revengeoffallen26-Jun-12 2:53 
GeneralRe: Need a multilingual virtual keyboard. Simulating key action using virtual key codes. Unable to generate accented charcacters Pin
Richard MacCutchan26-Jun-12 3:02
mveRichard MacCutchan26-Jun-12 3:02 
Questionxaml parser exception Pin
Mydsh25-Jun-12 19:28
Mydsh25-Jun-12 19:28 
AnswerRe: xaml parser exception Pin
Dave Kreskowiak26-Jun-12 3:00
mveDave Kreskowiak26-Jun-12 3:00 
Questionarabic to roman numerals Pin
Salomon Velazquez25-Jun-12 13:38
Salomon Velazquez25-Jun-12 13:38 

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.