EnableStatic on a disconnected media
- From: "Alexis Héon" <Alexis.Heon@xxxxxxxxx>
- Date: 29 Nov 2006 13:33:49 -0800
Hi,
I'm having some trouble setting a network adapter in static adressing
mode. When I call the EnableStatic method I get an error code 94 (Path,
files or object not found.). However, when I check the configuration of
my local area connection, I notice that it was configured properly. I'm
working with local wmi call.
Here are my connection options:
this.connectionOptions.EnablePrivileges = true;
this.connectionOptions.Authentication =
AuthenticationLevel.PacketPrivacy;
this.connectionOptions.Impersonation =
ImpersonationLevel.Impersonate;
Here is my WMI method call:
ManagementBaseObject inParams =
target.GetMethodParameters("EnableStatic");
if (parameters != null)
{
inParams["IPAddress"] = new string[] {
value.IPAddress.ToString() };
inParams["SubnetMask"] = new string[] {
value.SubnetMask.ToString() };
}
uint result = (uint)target.InvokeMethod("EnableStatic",
inParams, this.methodOptions).GetPropertyValue("ReturnValue");
NOTE:IPAddress and SubnetMask are of type System.Net.IPAddress
Also, EnableDHCP seem to have the same behavior. Any idea how should I
solver my problem?
Regards,
Alexis Héon
.
- Prev by Date: wxDevC++ and WMI?
- Next by Date: Wi-fi Signal Strength Event Trigger.
- Previous by thread: wxDevC++ and WMI?
- Next by thread: Wi-fi Signal Strength Event Trigger.
- Index(es):
Loading