- else
- {
- // resolve the functions we need
-
- // this will contain the name of the function we failed to resolve
- // if any at the end
- const char *funcName = NULL;
-
- // get the function from rasapi32.dll and abort if it's not found
- #define RESOLVE_RAS_FUNCTION(type, name) \
- ms_pfn##name = (type)wxDllLoader::GetSymbol(ms_dllRas, \
- wxString(_T(#name)) + gs_funcSuffix); \
- if ( !ms_pfn##name ) \
- { \
- funcName = #name; \
- goto exit; \
- }
-
- // a variant of above macro which doesn't abort if the function is
- // not found in the DLL
- #define RESOLVE_OPTIONAL_RAS_FUNCTION(type, name) \
- ms_pfn##name = (type)wxDllLoader::GetSymbol(ms_dllRas, \
- wxString(_T(#name)) + gs_funcSuffix);
-
- RESOLVE_RAS_FUNCTION(RASDIAL, RasDial);
- RESOLVE_RAS_FUNCTION(RASENUMCONNECTIONS, RasEnumConnections);
- RESOLVE_RAS_FUNCTION(RASENUMENTRIES, RasEnumEntries);
- RESOLVE_RAS_FUNCTION(RASGETCONNECTSTATUS, RasGetConnectStatus);
- RESOLVE_RAS_FUNCTION(RASGETERRORSTRING, RasGetErrorString);
- RESOLVE_RAS_FUNCTION(RASHANGUP, RasHangUp);
- RESOLVE_RAS_FUNCTION(RASGETENTRYDIALPARAMS, RasGetEntryDialParams);
-
- // suppress wxDllLoader messages about missing (non essential)
- // functions
- {
- wxLogNull noLog;
-
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASGETPROJECTIONINFO, RasGetProjectionInfo);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASCREATEPHONEBOOKENTRY, RasCreatePhonebookEntry);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASEDITPHONEBOOKENTRY, RasEditPhonebookEntry);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASSETENTRYDIALPARAMS, RasSetEntryDialParams);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASGETENTRYPROPERTIES, RasGetEntryProperties);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASSETENTRYPROPERTIES, RasSetEntryProperties);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASRENAMEENTRY, RasRenameEntry);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASDELETEENTRY, RasDeleteEntry);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASVALIDATEENTRYNAME, RasValidateEntryName);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASGETCOUNTRYINFO, RasGetCountryInfo);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASENUMDEVICES, RasEnumDevices);
- RESOLVE_OPTIONAL_RAS_FUNCTION(RASCONNECTIONNOTIFICATION, RasConnectionNotification);
- }