Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wininet code in Server 2003

Status
Not open for further replies.

white605

Technical User
Jan 20, 2003
394
US
The following Code runs well in W2k but Fails in server2003. Is there some sort of default security setting in server that stops this code?

Code:
 *TEST FOR INTERNET CONNCETION
Declare Integer InternetCheckConnection In wininet;
	STRING lpszUrl, Integer dwFlags, Integer dwReserved

 #Define FLAG_ICC_FORCE_CONNECTION  1
lResult=(InternetCheckConnection("[URL unfurl="true"]http://smtp.DIRECWAY.COM",[/URL] FLAG_ICC_FORCE_CONNECTION, 0)=1)

  If .Not. lResult
    Wait Window [no internet connection - CANNOT SEND EMAIL]
    RETURN
  Else
    *DO NOTHING - CONTINUE SENDING EMAIL
  Endif
Thanks,
wjwjr
 
That works for me:
Code:
 *TEST FOR INTERNET CONNCETION
Declare Integer InternetCheckConnection In wininet;
    STRING lpszUrl, Integer dwFlags, Integer dwReserved

 #Define FLAG_ICC_FORCE_CONNECTION  1
lResult=(InternetCheckConnection("[URL unfurl="true"]http://www.google.com",[/URL] FLAG_ICC_FORCE_CONNECTION, 0)=1)

  If .Not. lResult
    Wait Window [no internet connection - CANNOT SEND EMAIL]
    RETURN
  Else
    *DO NOTHING - CONTINUE SENDING EMAIL
    ? [WE HAVE CONNECTION]
  Endif

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Wonder if the IE security on server messes with it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top