Hi I am trying to send a Post request to a MySQL online database using a PowerPoint VBA Macintosh.
I have tried using the following code, but am receiving issues in accessing the library function.
Private Declare PtrSafe Function system Lib "libc.dylib" (ByVal command As String) As LongHowever, this code is returning an error: File not found: libc.dylibFunction getHTTPPost(sUrl As String, sQuery As String) As Long sCmd = "curl -v -X POST -d '" & sQuery & "' " & sUrl exitCode = system(sCmd) End Function ans = getHTTPPost("http:myserver/AddNew.php?", "name=JoeBloggs&score=20")
I did an online search and found this issue has arisen after some kind of update https://github.com/VBA-tools/VBA-Web/issues/385
The solution indicated is to set the location of the Library file name to "/usr/lib/libc.dylib". Hence I changed the line to:
However, at the moment I continue to get a file not found error. I would be very grateful if anyone could tell me what the correct Mac Function Declaration is.Private Declare PtrSafe Function system Lib "/usr/lib/libc.dylib" (ByVal command As String) As Long
Thank you for any comments!



Reply With Quote