HighTechTalks DotNet Forums  

Partial resultsets

Dotnet Framework (WMI) microsoft.public.dotnet.framework.wmi


Discuss Partial resultsets in the Dotnet Framework (WMI) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Steven Kilby
 
Posts: n/a

Default Partial resultsets - 11-14-2007 , 03:32 AM






Hi,

I would like to be able to retrieve a partial result set. For example,
suppose I am running 4 processes and each one hosts a single decoupled
provider. If I wanted to get a count of the instances I can do something
like:

ManagementScope s = new ...
ManagementPath p = new ...
ManagementClass c = new ...
coll = c.GetInstances();
int i = collection.Count;

This works fine until one of the processes has a problem and doesn't return
back to WMI. In that case the call coll.Count blocks indefinitely.

I can get around this with the following:

EnumerationOptions e = new EnumerationOptions();
e.TimeOut = new TimeSpan(0, 0, 1);
coll = c.GetInstances(null, e);
int i = 0;

try
{
int i = coll.Count;
}
catch(ManagementException) {}

This doesn't block indefintely, but it always returns 0, even though only
one of the host processes is having a problem. Is there a way to get a
partial resultset? Isn't there a way to retrieve the instances hosted by
the remaining healthy processes?

Thanks
Steven



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.