cURL / Mailing Lists / curl-library / Single Mail


accessing libcurl in VBA from within Excel

From: Joe Byrne <>
Date: Tue, 6 Jul 2004 22:44:07 -0700

I'm a hack trying to use libcurl from Excel. I extracted libcurl.dll from
one of the Win32/devel zip files on the download page of and
dropped in system32. My Excel VBA test code is:

Declare Function CurlEasyInit Lib "libcurl" _
     Alias "curl_easy_init" () As Long

 Declare Sub CurlEasyCleanUp Lib "libcurl" _
     Alias "curl_easy_cleanup" (handle As Long)

 Sub foo()
 Dim handle As Long

 handle = CurlEasyInit()
 Call CurlEasyCleanUp(handle)

 End Sub

The above code bombs on CallEasyCleanUp. What am I doing wrong?

Received on 2004-07-07