Set IPAddress programatically

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
 
P

Paul G. Tobey [eMVP]

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

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top