Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Getting an application to auto-dial 2003-10-24 -- Simon Burrows There are two API's which you can use for this.
The first InternetGetConnectedState(iStatus,0) returns true if there already
is an Internet connection available
The second InternetAttemptConnect(0) will popup a dialup connection dialog
if there is no connection already. Bear in mind that this is based on your
IE dialup settings, so if they are set to never dial, then this popup will
be ignored.
iConnection = InternetGetConnectedState(iStatus,0) !Find current
connection
iDialUp = InternetAttemptConnect(0)
!display the dialup dialog
(iStatus contains a ULong with represents the type of connection for this
computer (i.e. dialup, Proxy, LAN etc). iStatus does not however represent
any current connection, just the method.
These functions are defined in the wininet.lib file which is in your
c55/libsrc directory
So in your global embeds in the 'Inside Global Map' embed put:-
Module('Wininet.lib')
InternetAttemptConnect(ULong),Long,
pascal,raw,name('InternetAttemptConnect')
InternetGetConnectedState(*Ulong,Ulong),Long,Pascal,raw,name('InternetGetCon
nectedState')
end
And REMEBER to include the wininet.lib file in your project, otherwise you
will get a compile error.
Today is November 21, 2024, 8:25 am This article has been viewed 35228 times.
|
|