Prev: ReportProInit()
Next: Opening index automatically
From: John Martens on 12 Apr 2010 10:52 The most essential method is GetDocumentByForm which is from Norbert. Without the GetOrPost AEF of Norbert I would never got it to work. John Op 12-4-2010 9:46, richard.townsendrose schreef: > John > > will have a look at your way as well ... > > but Norbert's code is very easy as well, and very well suited to > picking up stuff from our arays of data ... > > richard >
From: Norbert Kolb on 12 Apr 2010 19:15 Hallo Richard, nice to hear. > then of course the last difficult bit [for me] - get a progress bar > for monitoring the http file upload ... if geoff can do it for an ftp > upload i am sure that it is possible. I'm not sure if you can do that with the cHttp-Class. I did it for a download. I am interested in finding a solution for upload. Norbert
From: richard.townsendrose on 13 Apr 2010 11:54
Norbert did you ever look at geoff's internet library - he did get ftp upload bar using his "putlowlevel" method... from his sample which i adapted a bit ... but really its writing thru the buffer which is monitored whislt writing up the way uisng the InternetWriteFile(hfFTP, @abBuff[1], n, @n) function. is it possible to get information from wininet.dll uisng the HttpQueryInfo() function ??? see http://msdn.microsoft.com/en-us/library/aa385473(v=VS.85).aspx i would be much intertested to see your download progress monitor ... richard METHOD PutLowLevel(cFile) CLASS FTPSender LOCAL hfLocal AS PTR LOCAL cUpFile AS STRING LOCAL hfFTP AS PTR LOCAL nSize AS DWORD LOCAL lRet AS LOGIC LOCAL n AS DWORD LOCAL DIM abBuff[MAX_BUFF_SIZE] AS BYTE nSize:=Directory(cFile)[1, F_SIZE] cUpFile:=SubStr(cFile, RAt('\', cFile) + 1) hfLocal := FOpen(cFile) IF hfLocal != NULL_PTR hfFTP := SELF:OpenFile(cUpFile, GENERIC_WRITE ) SELF:Owner:FTPMsg:= "Sending: " + cUpFile + " (" + NTrim(nSize) + " bytes)" Sleep(500) IF hfFTP != NULL_PTR n := MAX_BUFF_SIZE lRet := TRUE IF ! SELF:lIfTest SELF:Owner:UploadProg(#SHOW, nSize) ENDIF DO WHILE (n = MAX_BUFF_SIZE) ApplicationExec(EXECWHILEEVENT) n := FRead3(hfLocal, @abBuff[1], n) IF n > 0 IF !InternetWriteFile(hfFTP, @abBuff[1], n, @n) SELF:Error := GetLastError() lRet := FALSE EXIT ENDIF IF ! SELF:lIfTest SELF:Owner:UploadProg(#PROG, n) ENDIF ENDIF ENDDO SELF:CloseFile(hfFTP) SELF:Owner:FTPMsg:= "File sent ( " + NTrim(nSize) + " bytes)" IF ! SELF:lIfTest SELF:Owner:UploadProg(#HIDE, 0) ENDIF ELSE SELF:Error := ERROR_INTERNET_INVALID_OPERATION SELF:Owner:FTPMsg := "File not sent" ENDIF FClose(hfLocal) ENDIF RETURN lRet |