cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: using libcurl with Visual Basic from MS-Access and Windows2000

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 30 Oct 2003 11:05:43 +0100 (CET)

On Thu, 30 Oct 2003 wolfgang.voss_at_lhsystems.com wrote:

> I copied Libcurl.dll to systems32.

Where did you find/download this "libcurl.dll"?

> Function CURL_GET(URL) As String
> Dim Temp, H As Long
> H = curl_easy_init()
> Temp = curl_easy_setopt(H, 1, "C:\tmp\Antwort.txt")
> Temp = curl_easy_setopt(H, 2, URL)

This is not only very ugly code (ugly because you attempt to use the plain
numbers instead of the prefered names for the options), it also won't work.
There are no options in libcurl that use the numbers 1 or 2. If you really
need to do it this way, you need to understand the CINIT() macro used in the
curl.h file, as it adds two numbers. One of them being the type of the option,
the other being the enumerated option number.

I would suggest writing a less crude interface.

> Executing the first Statement H=curl_easy_init() gives the error:
> "Run-time Error '53':
> File not fount: libcurl.dll"
>
> Apparently the library is not in a format that is recognised by Visual
> Basic.

It might not be. What are the requirements for it to be recognized as such?

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Received on 2003-10-30