Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Libcurl and vfp2c32.fll
Message
From
24/09/2008 09:46:43
 
 
To
24/09/2008 04:22:14
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01350016
Message ID:
01350175
Views:
26
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform