Hi Aleksey, Problems with RASCONN size values are often due to differences between the #define WINVER value in a project and the target OS. Make sure these values are in synch.
Hard-coding a dwSize member variable is a struct that is passed as a [in/out] parameter to a Win32 API call is extremely risky. Changing a #define like UNICODE or WINVER somewhere else in the program can end up causing stack corruption, and is a huge security risk. Nick ----- Original Message ----- From: "Dr. Aleksey Nudelman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 30, 2002 12:19 PM Subject: [DOTNET] incrorrect RASCONN structure size in VC++ 7.0 > Hello, > sizeof(RASCONNA) returns different values in VC++ 7.0 and VC++ 6.0. > This causes failure of RasEnumConnections calls. > This apparently happens because of the changes in ras.h between VC 7 and VC > 6 > Workaround: > 1. Ignore MSDN example on RasEnumConnections > 2. Hardcode > lpRasConn->dwSize = 412;lpcb=412; > Did anybody encounter a similar problem? > Cheers, > Aleksey > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.