Set IPAddress programatically

  • Thread starter Thread starter Russ Du Preez
  • Start date Start date
R

Russ Du Preez

Hi all,

I am trying to set the ip address programatically. I have a ce.net 4.2
device. I tried using the OpenNetCF API to change the ipaddress, with
no luck. When I try to rebind the adapter it throws the following
error:An unhandled exception of type 'OpenNETCF.Net.AdapterException'
occurred in OpenNETCF.Net.dll

Additional information: DeviceIoControl( IOCTL_NDIS_BIND_ADAPTER ).

Since then I have gone directly to the registry and updated IpAddress,
Subnetmask and DefaultGateway @ HKLM\Comm\[Device]\Parms\TcpIP.
If I softreset the device my changes take effect. How do I notify the
device that the IP address has changed.

Thanks,
Russ
 
After changing the registry, do a *re*bind on the adapter and it will fetch
the settings from the registry.

Paul T.
 
Back
Top