Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP60- IE
Message
From
10/08/2000 13:18:25
 
 
To
10/08/2000 10:30:55
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00403365
Message ID:
00403512
Views:
13
Just wanted to thank you for your help, we mixed some of your code with some of our code and we got great results!

>Howdy, I use wininit.dll to check for a connection then to do dialup and later the hangup. I use internet exporer to access pages upload request and get back pages to parse.
>**** examples below are snipped from active code [they work] to show the calls, the loops and returns are because they are in the middle of a bunch of other stuff and are part of functions and I did not clean it up much.
>
>*connected state check
>DECLARE Integer InternetGetConnectedState IN WinInet Integer @nContext, Integer nFlags
>lnConnectionState = 0
>fResult = InternetGetConnectedState(@lnConnectionState, 0)
>
>*** to dialup on default ras
>DECLARE Integer InternetDial IN WinInet Integer nHandle, String @lpcDialUp, Integer nAccessType, Integer @nConnect_Handle, Integer nFlags
>** fResult = InternetDial(lnHWNDHandle, @lcDialUpName,nFlag,@lnConnectionID, 0)
> fResult = InternetDial(0,"", 0, @nInet_Handle, 0)
>
>***to open explorer access internet pages
> If type('oie.document.url')<>'O'
> Public OIE
> OIE=createobject('internetexplorer.application')
> Endif
> OIE.navigate(cURL)
> * rudimentary delay
> =begwait("Loading Internet URL for Search . . . . ")
> Do WHILE OIE.Readystate <> 4
> Enddo
> Do CASE
> Case UPPE(OIE.document.title)=UPPE("Cannot find server")
> Retu .f.
> Case OIE.Offline
> Retu .f.
> Other
> Retu .t.
> Endcase
>**** to utilize asp page, you must know page objects names
> OIE.document.form_1.vin_1.value=cVIN
> OIE.document.form_1.submit
> Do WHILE OIE.Readystate <> 4
> Enddo
> ctext=OIE.document.body.innertext
> ctext=subs(ctext,at('Remarks Table',ctext)+13)
> Retu ctext
>*** to logout etc
> If type('oie.document.url')='O'
> If OIE.Busy
> OIE.stop
> endif
> OIE.quit
> Rele OIE
> ENDIF
>
>IF m.nInet_Handle != 0
>DECLARE Integer InternetCloseHandle IN WinInet ;
> Integer nConnect_Handle
>DECLARE Integer InternetHangUp IN WinInet ;
> Integer nConnect_Handle, Integer nFlags
>*Declare Integer InternetAutodialHangup IN WinInet Integer nFlags
>* =InternetAutodialHangup(0)
> =InternetHangUp(nInet_Handle,0)
>
>DECLARE Integer InternetGetConnectedState IN WinInet ;
> Integer @nContext, Integer nFlags
> lnConnectionState = 0
> fResult = InternetGetConnectedState(@lnConnectionState, 0)
>IF lnConnectionState=81 && or lnConnectionState=18 && 1,81=online,82=offline, 18=on with network
> Declare Integer InternetAutodialHangup IN WinInet Integer nFlags
> =InternetAutodialHangup(0)
>ENDIF
>
> =InternetCloseHandle(nInet_Handle)
> m.nInet_Handle = 0
>
>ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform