Archive: Dialer::AutodialHangup not working


Dialer::AutodialHangup not working
  after testing the following script on a 52k modem the file downloads but the Dialer::AutodialHangup returns a "success" yet the connection is still on and Dialer::GetConnectedState returns online. What could be the problem? Need help really quickly on this thanks!!






Dialer
::AutodialOnline
netLoad::load "http://www.company.com/productversion.txt" "$TEMP/productversion.ini" /END

push $R0
Dialer::AutodialHangup
pop $R0
MessageBox MB_OK|MB_ICONEXCLAMATION "Disconnected = $R0";
>Push $R0
Dialer::GetConnectedState
Pop $R0
MessageBox MB_OK|MB_ICONEXCLAMATION "internet is now $R0";

Was it really Dialer::AutodialOnline that initiated the connection or was it connected before?

Both functions simply call the appropriate InternetX API function and convert their return value to words. Maybe MSDN can shed some light on the issue.


yep the connection is initialised by the Dialer plug in. will check out MSDN but the way I have it is how it is usually done right?


how do you go about calling a function such as hangup function from within an installer?


The code seems right to me. However, as it's just a thin layer around the API, there might be more to it.

To call that hangup function, you can use the System plug-in. However, I don't see how you'd get the connection identifier.


god, system calls are intimidating teritory for me!

could I establish a connection through a system call and get the identifier that way?


InternetDial seems like the API you're looking for. However, it requires a connection name. There's probably another function that enumerates those.

If you don't want to use the System plug-in, you can always write a simple plug-in using the ExDLL skeleton from the source code package.