I have a piece of software running on a remote device which calls InternetDial to establish a connection and report information.
Most of the time this works fine, but occasionally, some sort of error will occurr (bad signal etc.) and despite calling the function with INTERNET_AUTODIAL_FORCE_UNATTENDED
, windows still appears to pop up dialogs when it fails to connect.
Rather annoyingly though, these dialogs are modal so the code just locks up.
I've tried just about every combination of options on the network configuration and ways to call the InternetDial
routine, but none of them stop that dialog from appearing:
m_DResult = InternetDial(NULL, m_staticModemProfile, INTERNET_AUTODIAL_FORCE_UNATTENDED, (LPDWORD) &m_cnx, NULL);
m_DResult = InternetDial(NULL, NULL, INTERNET_AUTODIAL_FORCE_UNATTENDED, (LPDWORD) &m_cnx, NULL);
m_DResult = InternetDial(NULL, NULL, INTERNET_DIAL_UNATTENDED, (LPDWORD) &m_cnx, NULL);
m_DResult = InternetDial(NULL, m_staticModemProfile, INTERNET_DIAL_UNATTENDED, (LPDWORD) &m_cnx, NULL);
Is there a way round this or another way I can connect? I'm developing on Vista and XP Embedded if that makes a difference.