Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Libcurl and vfp2c32.fll
Message
De
24/09/2008 09:46:43
 
 
À
24/09/2008 04:22:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01350016
Message ID:
01350175
Vues:
25
>Hello Carlos,
>
>
>cur_off_t is a 64bit datatype.
>
>Currently the CreateCallbackFunc does not support 64 bit integers, but you can "fake" it by supplying two parameters instead.
>The drawback is that these two parameters now contain garbage values.
>
>e.g.
>
>This._CurlSeekCallBackAddress  = CreateCallBackFunc("CurlSeekCallBack", "INTEGER","INTEGER,INTEGER,UINTEGER,INTEGER", This, 1)
>
>
>this should fix the "dll exception" problem.
>

Christian:

Thank you very much for your answer. I tried your suggestion, I still get a dll exception when the CurlSeekCallBack method gets called.

I understand your solution, spliting the 64 bit integer into two 32 bit parts, and If I test with values less than 2^32 I get the correct value in the first low part of the parameter.

Since CurlSeekCallBack is only called when a seek on the file has to be done, to test, I start an FTP upload, then interrupt it. When I try to resume the upload, I get the "Declare DLL caused an exception" error, and the debugger is in the line with the curl_easy_perfom api call.

I have this line in the CurlSeekCallBack method:

?nFileHandle, nOffset_l, nOffset_h, nOrigin

That line prints:

25 128581632 0 0

And that is consistent with the expected values, 128581632 is exaclty the size of the partial upload in the FTP server, and the file pointer is moved, and then the CurlSeekCallBack returns 0 as stated in the libculr docs, and then the exception is raised.

This is as far as I can go on my own, thanks again for your comments.

Carlos Alloatti
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform