Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. GetIpNetTable and MFC dialogs

GetIpNetTable and MFC dialogs

Scheduled Pinned Locked Moved System Admin
c++helpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tom76
    wrote on last edited by
    #1

    I've created an app in MFC that is dialog based, and I call functions such as GetIfTable to retrieve data and display it using SetDlgItemText to pop it into an editbox. However, when I call GetIpNetTable to get a table of Address Resolution Table rows, I immediately lose my m_hWnd member. I've not had this problem with the other functions, just this one. Has anyone come across this problem before? I've looked on google but can't find anything. I've tried creating a dummy HWND and assigning it the value of m_hWnd and then reassigning after calling the function but all I get is an access violation message. Obseve everything, remember more...

    T 1 Reply Last reply
    0
    • T tom76

      I've created an app in MFC that is dialog based, and I call functions such as GetIfTable to retrieve data and display it using SetDlgItemText to pop it into an editbox. However, when I call GetIpNetTable to get a table of Address Resolution Table rows, I immediately lose my m_hWnd member. I've not had this problem with the other functions, just this one. Has anyone come across this problem before? I've looked on google but can't find anything. I've tried creating a dummy HWND and assigning it the value of m_hWnd and then reassigning after calling the function but all I get is an access violation message. Obseve everything, remember more...

      T Offline
      T Offline
      tom76
      wrote on last edited by
      #2

      Sorted it - user error I think. I put a watch on m_hWnd and after calling the function it said the expression could not be evaluated. I had allocated the buffer too small so it seems the buffer was overwritten, and the variable m_hWnd was overwritten! Obseve everything, remember more...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups