c# network configuration

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rustam asgarov

    #1

    c# network configuration

    Hi.
    I using c# to develop application for PDA.
    I need to tell system to renew its ip address from dhcp
    server, but can not find any function to do this.
    In visual c++ it is possible with iprenewaddress( ) function
    which uses "ip helper" library.

    Thanks in advance....
    Rustam.

  • Chris LaJoie

    #2
    Re: c# network configuration

    use the DllImport attribute to import the library. If you post the header
    file (*.h) that you found the C++ definition in then I can convert it to C#
    for you.

    Chris

    "rustam asgarov" <rustam@boun.ed u.tr> wrote in message
    news:eGjw0vasDH A.2252@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hi.
    > I using c# to develop application for PDA.
    > I need to tell system to renew its ip address from dhcp
    > server, but can not find any function to do this.
    > In visual c++ it is possible with iprenewaddress( ) function
    > which uses "ip helper" library.
    >
    > Thanks in advance....
    > Rustam.
    >[/color]


    Comment

    • Rustam Asgarov

      #3
      Re: c# network configuration

      Isn't it possible to use *.h files written in c++ directly from c# ?


      Chris LaJoie wrote:
      [color=blue]
      > use the DllImport attribute to import the library. If you post the header
      > file (*.h) that you found the C++ definition in then I can convert it to C#
      > for you.
      >
      > Chris
      >
      > "rustam asgarov" <rustam@boun.ed u.tr> wrote in message
      > news:eGjw0vasDH A.2252@TK2MSFTN GP09.phx.gbl...
      >[color=green]
      >>Hi.
      >>I using c# to develop application for PDA.
      >>I need to tell system to renew its ip address from dhcp
      >>server, but can not find any function to do this.
      >>In visual c++ it is possible with iprenewaddress( ) function
      >>which uses "ip helper" library.
      >>
      >>Thanks in advance....
      >>Rustam.
      >>[/color]
      >
      >
      >[/color]

      Comment

      • John Puopolo

        #4
        Re: c# network configuration

        Rustam:

        Your question is unclear. What do you need from the C++ header file in your
        C# program?

        If you need #defines and const variables, you will need to redeclare them in
        your C# file. Same goes for function headers.

        In other words, no, you cannot use header files from C++ in C# directly. To
        call C/C++ functions and to interact w/ C/C++ code, you will need to use the
        P/Invoke Interop layer defined as part of the .NET Framwork.

        John



        "Rustam Asgarov" <rustam@boun.ed u.tr> wrote in message
        news:uimnfzCtDH A.3236@tk2msftn gp13.phx.gbl...[color=blue]
        > Isn't it possible to use *.h files written in c++ directly from c# ?
        >
        >
        > Chris LaJoie wrote:
        >[color=green]
        > > use the DllImport attribute to import the library. If you post the[/color][/color]
        header[color=blue][color=green]
        > > file (*.h) that you found the C++ definition in then I can convert it to[/color][/color]
        C#[color=blue][color=green]
        > > for you.
        > >
        > > Chris
        > >
        > > "rustam asgarov" <rustam@boun.ed u.tr> wrote in message
        > > news:eGjw0vasDH A.2252@TK2MSFTN GP09.phx.gbl...
        > >[color=darkred]
        > >>Hi.
        > >>I using c# to develop application for PDA.
        > >>I need to tell system to renew its ip address from dhcp
        > >>server, but can not find any function to do this.
        > >>In visual c++ it is possible with iprenewaddress( ) function
        > >>which uses "ip helper" library.
        > >>
        > >>Thanks in advance....
        > >>Rustam.
        > >>[/color]
        > >
        > >
        > >[/color]
        >[/color]


        Comment

        Working...