Is there any way to get the Message Text from the return value of WMI InvokeMethod e.g. for the following code
ManagementBaseObject outParam = nicMO.InvokeMethod("SetGateways", newGateway, null);
int result = outParam["ReturnValue"];
Microsoft has published return values
Is there anyway to get the readable message from the return values instead creating hardcoded return value and message dictionary.
note: Please give me something which can work in .net 2.0 (and/or .net 1.1)
You can get the description of the value returned by the
SetGateWays
method using theValueMap and Value Qualifiers
.Try this sample