GetIpNetTable and MFC dialogs
-
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...
-
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...
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...