Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3400048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:50:42+00:00 2026-05-18T04:50:42+00:00

i tried to write program adding ip address using this function DWORD AddIPAddress( __in

  • 0

i tried to write program adding ip address using this function

 
DWORD AddIPAddress(
  __in   IPAddr Address,
  __in   IPMask IpMask,
  __in   DWORD IfIndex,
  __out  PULONG NTEContext,
  __out  PULONG NTEInstance
);

I have added it but how can I delete it. DeleteIPAddress takes NTEContext as Parameter how can i get it in MSDN they write it is returned by AddIPAddress function but when i call it for the second time with the same ip address it returns an error 2. What to do?

I can view add ip addresses using Ipconfig command in cmd, may be there is some other method to view or delete it manually

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:50:43+00:00Added an answer on May 18, 2026 at 4:50 am

    You can’t do this. From MSDN:

    To use DeleteIPAddress, AddIPAddress
    must first be called to get the handle
    NTEContext. The previous procedure
    assumes that AddIPAddress has already
    been called somewhere in the code, and
    NTEContext has been saved and remains
    uncorrupted.

    The lifetime of the added address is as shown here:

    The AddIPAddress function is used to
    add a new IPv4 address entry on a
    local computer. The IPv4 address added
    by the AddIPAddress function is not
    persistent. The IPv4 address exists
    only as long as the adapter object
    exists. Restarting the computer
    destroys the IPv4 address, as does
    manually resetting the network
    interface card (NIC). Also, certain
    PnP events may destroy the address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've tried to write a string replace function in C, which works on a
I have tried to write my first Boost program from information on the Boost
Today i tried to write a program which checks some checkboxes for me on
I am trying to write a program in c using the MPI library. In
I am trying to write a program that uses a C API. This API
tried to write a program which logs me in automatically in a webbrowser in
Several years back, I innocently tried to write a little app to save my
Has anyone tried to dynamically select which properties they want to write to an
Tried something like this: HttpApplication app = s as HttpApplication; //s is sender of
I tried scouring the web for help on this issue, but there are so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.