The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Slugsnack on March 31, 2009, 05:20:42 PM

Title: Network API
Post by: Slugsnack on March 31, 2009, 05:20:42 PM
Anyone know some Windows APIs that can be used to break and re-enable a network connection ?  I initially thought WNetCancelConnection2() would do the job but that is for mapped network drives.  I want to be able to do the same as if I go to network connections and disable/re-enable the connection from there.

Thanks
Title: Re: Network API
Post by: Vortex on March 31, 2009, 05:32:25 PM
http://msdn.microsoft.com/en-us/library/aa394595.aspx

The netsh command should also work.
Title: Re: Network API
Post by: Slugsnack on March 31, 2009, 07:04:52 PM
Mmmmm is there any regular APIs that can be used instead ?  Not even sure how I would go about using those for MASM..  The netsh method I had come across before but it seems rather inelegant if there are functions available that do what I want.

Can you even use classes with MASM ?  I've used them to quite some extent in Java previously but not sure how I would go about doing so for MASM..