Original Post
Hi, guys!
I am experiencing some problems concerning PPP protocols with RAS API(Platform SDK).
When I call a SetEntryProperties, after filling the RASDATA field, I get error code 632(ERROR_INVALID_SIZE), telling me the size of the structure is incorrect.
I''ve heard this is a problem with Win2K, but I couldn´t test it in other OS.
Here is my piece of code:
DWORD CreateDialupEntry(LPCTSTR Entryname, CString Phonenumber, CString Modemname)
{
RASENTRY Entrydata;
// Sets up the RasEntry structure
ZeroMemory(&Entrydata, sizeof(RASENTRY));
Entrydata.dwSize = sizeof(RASENTRY);
Entrydata.dwfOptions = RASEO_NetworkLogon;
// Location/phone number
strcpy(Entrydata.szLocalPhoneNumber, Phonenumber);
// Protocols definitons...
Entrydata.dwfNetProtocols = RASNP_Ip;
Entrydata.dwFramingProtocol = RASFP_Ppp;
strcpy(Entrydata.szDeviceType, RASDT_Modem);
strcpy(Entrydata.szDeviceName, Modemname);
// Now create our conn.
DWORD result = 0;
result = RasSetEntryProperties(NULL, Entryname, &Entrydata, sizeof(RASENTRY), NULL, 0);
return result;
}
Plz help me...
See ya.
-bye!
-Roger-