flatface
24th September 2006 22:54 UTC
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";
kichik
24th September 2006 23:12 UTC
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.
flatface
24th September 2006 23:26 UTC
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?
flatface
24th September 2006 23:34 UTC
how do you go about calling a function such as hangup function from within an installer?
kichik
24th September 2006 23:47 UTC
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.
flatface
25th September 2006 00:29 UTC
god, system calls are intimidating teritory for me!
could I establish a connection through a system call and get the identifier that way?
kichik
29th September 2006 10:30 UTC
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.