Devices

mads68
12-22-2000, 12:56 AM
What API-function can i use, if i want to activate or deactivate a device from VB.

Derek Stone
12-22-2000, 01:12 PM
What device?
You are talking about hardware right?
Please be clearer.

-cl

<a href="http://vb.wsoftware.net" target="_new">http://vb.wsoftware.net</a>

mads68
12-26-2000, 07:04 AM
Sorry. I'm a newbie in API-programming.
But what i want is to deactivate and activate my network card.

Derek Stone
12-26-2000, 10:15 AM
You can't activate or deactive a network card.
If it is plugged into your motherboard then it is on and will stay on (if it is working of course).
Its just like a modem.
What exactly are you trying to accomplish?
Maybe I can help if you give me the whole scenario.

Good Luck
-cl


<a href="http://vb.wsoftware.net" target="_new">http://vb.wsoftware.net</a>

mads68
12-27-2000, 12:06 AM
When i change my ip-address on my laptop, i don't restart the computer. I go into the device manager. Choose properties on my networkcard. Then i deactivate it and activate it again, and then i got my new ip-address.
My thought is. If it's possible to do this by hand, it must be possible to program too.

BillSoo
12-27-2000, 04:19 AM
I think winipcfg might do what you want. It's a windows utility that configures your IP settings. Typically I run it and press the "renew" button. In your case, you may have to change the IP address or something. Either way, you could write a program to run the winipcfg program, then use sendkeys to operate it.

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

niktesla
12-27-2000, 11:59 AM
In your command window type

ipconfig /release
then
ipconfig /renew



Brian T. Wiehoff

mads68
12-28-2000, 12:21 AM
Thanks!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum