RAS AutoDial Settings problem
-
I'm trying to configure my own GUI for an AutoDial RAS entry, in a similar method to the RasJazz[^] sample in the MSDN. I'm using RasSetEntryProperties to set the autodial DLL and autodial function, and have built a suitable RAS autodial DLL with both ASCII and Unicode exported functions. But it doesn't work. :( For some reason, calling RasSetEntryProperties seems to corrupt the dial-up entry, altering the options so that a phonebook entry which previously didn't prompt at all now prompts for the phone number. And regardless of this, the autodial function never seems to get called in my DLL. :confused: Anyone got a working example of this stuff?!? I've even tried compiling the FYI, here's my code to set up the phone book entry for my autodial DLL....
DWORD dwEntrySize = sizeof( RASENTRY ); RASENTRY entry; ZeroMemory( &entry, dwEntrySize ); entry.dwSize = dwEntrySize; DWORD dwRet = RasGetEntryProperties( NULL, sDialEntryName, &entry, &dwEntrySize, NULL, NULL); if( !dwRet ) { if( bAddAutoDial ) { // Set the path to this DLL and the function name strcpy( entry.szAutodialDll, sDLLPath ); strcpy( entry.szAutodialFunc, "ISPIAutoDialHandler" ); } else { entry.szAutodialDll[0] = NULL; entry.szAutodialFunc[0] = NULL; } dwRet = RasSetEntryProperties( NULL, sDialEntryName, &entry, entry.dwSize, NULL, 0); if( ! dwRet ) bRet = TRUE; }
________________________ http://www.webreaper.net