Rikardo
June 25th, 2002, 09:55 AM
Hi all
I have a problem reading rasapi properties. With Visual C++ SP 5 this code runs correctly, but with last SDK, the second RasGetEntryProperties call returns error 1784 "The supplied user buffer is not valid for the requested operation"
Why this code now not works?
RASENTRY rasEntry;
char phoneNumber[RAS_MaxPhoneNumber + 1];
DWORD entryInfoSize;
BYTE deviceInfo;
DWORD deviceInfoSize;
entryInfoSize=0;
deviceInfoSize=0;
memset (&rasEntry, 0, sizeof rasEntry);
rasEntry.dwSize = sizeof (RASENTRY);
printf ("Devuelto por RasGetEntryProperties %d",RasGetEntryProperties(NULL,"IBERDRTB", NULL, &entryInfoSize, NULL, &deviceInfoSize));
printf ("Devuelto por RasGetEntryProperties %d",RasGetEntryProperties(NULL,"IBERDRTB", &rasEntry, &entryInfoSize, &deviceInfo, &deviceInfoSize));
TPOLogString (10, "Numero de telefono rasEntry: %s",rasEntry.szLocalPhoneNumber);
I have a problem reading rasapi properties. With Visual C++ SP 5 this code runs correctly, but with last SDK, the second RasGetEntryProperties call returns error 1784 "The supplied user buffer is not valid for the requested operation"
Why this code now not works?
RASENTRY rasEntry;
char phoneNumber[RAS_MaxPhoneNumber + 1];
DWORD entryInfoSize;
BYTE deviceInfo;
DWORD deviceInfoSize;
entryInfoSize=0;
deviceInfoSize=0;
memset (&rasEntry, 0, sizeof rasEntry);
rasEntry.dwSize = sizeof (RASENTRY);
printf ("Devuelto por RasGetEntryProperties %d",RasGetEntryProperties(NULL,"IBERDRTB", NULL, &entryInfoSize, NULL, &deviceInfoSize));
printf ("Devuelto por RasGetEntryProperties %d",RasGetEntryProperties(NULL,"IBERDRTB", &rasEntry, &entryInfoSize, &deviceInfo, &deviceInfoSize));
TPOLogString (10, "Numero de telefono rasEntry: %s",rasEntry.szLocalPhoneNumber);