Click to See Complete Forum and Search --> : RAS functions and WINVER


Rantic
March 15th, 2004, 05:10 PM
hi,
when im using RasEnumConnections() on windows 98 it always returns an error of INVALID_BUFFER (612), when i define WINVER as 0x0401 or more, but if i define it as less than 0x0401 or dont define it all i get no error. The problem is that i need to have WINVER greater than 0x0400, because i need to use RasConnectionNotification() which wont work unless WINVER is greater then 0x0400.

It says on msdn that RasConnectionNotification works with windows98, so i dont understand why it shouldnt work on my Windows98 computer.

ne1 have any ideas whats wrong?

thanks
r

Mick
March 16th, 2004, 03:38 AM
I would say the size your setting for the the RASCON structure or the acutal rascon structure is incorrect.


typedef struct _RASCONN {
DWORD dwSize;
HRASCONN hrasconn;
TCHAR szEntryName[RAS_MaxEntryName + 1];

#if (WINVER >= 0x400)
TCHAR szDeviceType[ RAS_MaxDeviceType + 1 ];
TCHAR szDeviceName[ RAS_MaxDeviceName + 1 ];
#endif
#if (WINVER >= 0x401)
TCHAR szPhonebook [ MAX_PATH ];
DWORD dwSubEntry;
#endif
#if (WINVER >= 0x500)
GUID guidEntry;
#endif
#if (WINVER >= 0x501)
DWORD dwSessionId;
DWORD dwFlags;
LUID luid;
#endif
} RASCONN ;

Rantic
March 16th, 2004, 07:34 AM
can you tell me what all that actually means? im pretty new to windows programming...

thanks
r