Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
QuestionSHRINKING Pin
zeeShan anSari2-Oct-07 10:25
zeeShan anSari2-Oct-07 10:25 
AnswerRe: SHRINKING Pin
Colin Angus Mackay2-Oct-07 10:47
Colin Angus Mackay2-Oct-07 10:47 
GeneralRe: SHRINKING Pin
zeeShan anSari2-Oct-07 10:55
zeeShan anSari2-Oct-07 10:55 
QuestionDrawing single pixels in System.Drawing.Graphics Pin
Jimmy111112-Oct-07 9:37
Jimmy111112-Oct-07 9:37 
AnswerRe: Drawing single pixels in System.Drawing.Graphics Pin
TJoe2-Oct-07 9:42
TJoe2-Oct-07 9:42 
QuestionWMI and threading problem Pin
kpgd4572-Oct-07 9:34
kpgd4572-Oct-07 9:34 
GeneralRe: WMI and threading problem Pin
TJoe2-Oct-07 9:49
TJoe2-Oct-07 9:49 
GeneralRe: WMI and threading problem Pin
kpgd4572-Oct-07 23:29
kpgd4572-Oct-07 23:29 
Hi Tom

Thanks for the reply. I have allot of ports in TIME_WAIT. They dosent seem to be relesed. I dont know why they dont get relesed.
Do i need to do anything more??

public bool ServiceRunning(string n, string q)
  {


          //Connect to the remote computer
          ConnectionOptions co = new ConnectionOptions();

          TimeSpan ts = new TimeSpan(1000);
          co.Timeout = ts;

          //Point to machine
          ManagementScope ms = new ManagementScope("\\\\" + n + "\\root\\cimv2", co);

          ObjectQuery oQuery = new ObjectQuery(q);

          //Execute the query
          ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(ms, oQuery);
          ManagementObjectCollection objCol = null;
     try
     {
           objCol = oSearcher.Get();

          _WMIStatus = "WMI Running";

          if (objCol.Count > 0)
          {

              return true;

          }

          //oSearcher.Dispose();
      }
      catch (Exception e)
      {

          Console.WriteLine(e.Message);


      }
      finally
     {


          objCol.Dispose();
          oSearcher.Dispose();

      }

AnswerRe: WMI and threading problem Pin
TJoe3-Oct-07 4:27
TJoe3-Oct-07 4:27 
GeneralRe: WMI and threading problem Pin
kpgd4573-Oct-07 7:01
kpgd4573-Oct-07 7:01 
QuestionHow many Pixels?? Pin
zeeShan anSari2-Oct-07 9:17
zeeShan anSari2-Oct-07 9:17 
AnswerRe: How many Pixels?? Pin
Jimmy111112-Oct-07 9:20
Jimmy111112-Oct-07 9:20 
AnswerRe: How many Pixels?? Pin
TJoe2-Oct-07 9:20
TJoe2-Oct-07 9:20 
AnswerRe: How many Pixels?? Pin
Colin Angus Mackay2-Oct-07 9:22
Colin Angus Mackay2-Oct-07 9:22 
GeneralRe: How many Pixels?? Pin
ChrisKo2-Oct-07 9:56
ChrisKo2-Oct-07 9:56 
GeneralRe: How many Pixels?? Pin
Judah Gabriel Himango2-Oct-07 10:06
sponsorJudah Gabriel Himango2-Oct-07 10:06 
QuestionCompression Pin
Jim Warburton2-Oct-07 9:08
Jim Warburton2-Oct-07 9:08 
QuestionRe: Compression Pin
TJoe2-Oct-07 9:11
TJoe2-Oct-07 9:11 
AnswerRe: Compression Pin
Jim Warburton2-Oct-07 9:21
Jim Warburton2-Oct-07 9:21 
GeneralRe: Compression Pin
Dan Neely2-Oct-07 9:24
Dan Neely2-Oct-07 9:24 
GeneralRe: Compression Pin
TJoe2-Oct-07 9:25
TJoe2-Oct-07 9:25 
GeneralRe: Compression Pin
Jim Warburton2-Oct-07 9:34
Jim Warburton2-Oct-07 9:34 
GeneralRe: Compression Pin
TJoe2-Oct-07 9:39
TJoe2-Oct-07 9:39 
GeneralRe: Compression Pin
Jim Warburton2-Oct-07 10:06
Jim Warburton2-Oct-07 10:06 
AnswerRe: Compression Pin
Nathan Holt at EMOM2-Oct-07 9:14
Nathan Holt at EMOM2-Oct-07 9:14 

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.