Re: RRAS Static Route

From: Ashok Nandoori [MSFT] (ashnando_at_online.microsoft.com)
Date: 09/06/04


Date: Mon, 6 Sep 2004 11:56:51 +0530

You can use CreateProcess() to create a command line shell and execute netsh
commands as an argument. You may have to parse the output which is in
textual format. For more information on CreateProcess() go though
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp.

-- 
Thanks,
Ashok
---------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rick Knight" <knight_rjb@yahoo.com.au> wrote in message
news:4b3eabf7.0409052130.737aace6@posting.google.com...
> Hi,
>
> I have Routing and Remote Access server installed. I have added a
> Dial-On-Demand interface. I have also added a Static Route, and set it
> up so that it uses my DOD Interface. If I ping the required IP address
> windows automatically connects and all works fine.
>
> If I use the command line tool NetSH (ie. netsh routing ip show
> persistentroutes) it displays the current static/persistent route and
> it's associated Interface Name.
>
> Does anyone know how to extract this information from within an MFC
> application.
>
> Thanks in Advance.
> Rick 8-)


Relevant Pages

  • Re: networking problem
    ... netsh extensions hoping that it will depend on the core networking ... Network Command Shell ... Command Shell Interface Context ...
    (microsoft.public.windowsxp.embedded)
  • Re: Netsh- "Incorrect Function" trying to set IP.
    ... - Network Command Shell Interface Context ... KM, BSquare Corp.> I did a search for "netsh, Incorrect function" and I didn't see> anything matching what I'm seeing. ...
    (microsoft.public.windowsxp.embedded)
  • Re: netsh
    ... These netsh commands do nothing without a network card. ... > netsh interface show interface ... > instead of ipconfig command. ...
    (microsoft.public.windowsxp.general)
  • error in enable nic card with command line tool
    ... you can enable or disable a lan card with netsh tool in this ... netsh inerface set interface "Interface name like: ... what is your suggestion to enable a NIC card by command line tools? ...
    (microsoft.public.windows.server.general)
  • Re: system calls
    ... Writing a simple recursive file-deleter is fairly straightforward; ... If you really want to run a command line ... are better ways to do the operation from within the API, and be able to report to the user ... >I have looked at CreateProcess but found it complicated and unsatisfactory. ...
    (microsoft.public.vc.mfc)