4. April 2007 10:44
// Variablen
Name DataType Subtype Length
MIT OCX Microsoft Internet Transfer Control 6.0 (SP6)
vRemoteHost Variant
newUrl Text 250
url Text 250
starti Text 250
Counter Integer
-----------------------------------------------------------
//===========================================
// == MICROSOFT INTERNET TRANSFER CONTROL ==
// OCX
//===========================================
MIT.Protocol := 4; // 2=FTP, 4=HTTP
MIT.RequestTimeout := 30;
MIT.AccessType := 0; // 0=Default, 1=Direct, 2=Named Proxy
vRemoteHost := 'http://***********/main/link?application=*****&id=*&key=***-******';
newUrl := MIT.OpenURL(vRemoteHost); // get coded url from Server
REPEAT
SLEEP(100);
Counter += 1;
UNTIL (NOT MIT.StillExecuting) OR (Counter = 50);
IF NOT MIT.StillExecuting THEN BEGIN // check, if transfer is finished
IF COPYSTR(newUrl,1,4) <> 'http' THEN BEGIN
ERROR(err_0007); // return value not valid
END ELSE BEGIN
InvSetup.GET();
url := '-a ' + newUrl;
starti := STRSUBSTNO('"C:\Program Files\***-***\BBALauncher.exe" %1 -n omp',url);
SHELL(starti); // start BBALauncher with coded url and window name "omp"
// the user has to enter the password just the first time
END;
END ELSE
ERROR(err_0006,Counter * 100); // no response within 5 seconds -> site down?
26. April 2007 15:10