Hi,

Is it possible to invoke ipconfig /release & ipconfig /renew from inside a
c++ procedure; if so can some one give me the code snippit please?

Also, are there any direct DHCP commands available in c++

TIA

--
Regards,
Susan

Re: calling IPconfig..? by Igor

Igor
Thu Mar 01 07:03:50 CST 2007

"Tiscali" <kegler@tiscali.co.uk> wrote in message
news:45e68df9$1_2@mk-nntp-2.news.uk.tiscali.com
> Is it possible to invoke ipconfig /release & ipconfig /renew from
> inside a c++ procedure; if so can some one give me the code snippit
> please?

http://msdn2.microsoft.com/en-us/library/aa365798.aspx

> Also, are there any direct DHCP commands available in c++

http://msdn2.microsoft.com/en-us/library/aa363265.aspx

--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925



Re: calling IPconfig..? by Alex

Alex
Thu Mar 01 07:09:52 CST 2007

"Tiscali" <kegler@tiscali.co.uk> wrote:
> Is it possible to invoke ipconfig /release & ipconfig
> /renew from inside a c++ procedure; if so can some one
> give me the code snippit please?

Yes. Look for `CreateProcess' API in MSDN. Alternatively,
you can use CRT's families of funcions: `_execXXX',
`_spawnXXX' or `system'.

Win32 SDK - "Creating Processes"
http://msdn2.microsoft.com/en-us/library/ms682512.aspx

CRT - "Process and Environment Control"
http://msdn2.microsoft.com/en-us/library/d6dtz42k(VS.80).aspx

> Also, are there any direct DHCP commands available in c++

"Dynamic Host Configuration Protocol"
http://msdn2.microsoft.com/en-us/library/aa363383.aspx

Look in "DHCP Client API" section.


HTH
Alex