Hi,

I am not able to load any dll library using the cffi:load-foreign-library function. I have tried using working dlls libcairo.dll, zlib1.dll, .. all of which have been working perfectly in other softwares. I have tried using win32 as well as win64 versions. This is the trace:

Unable to load foreign library (LIBRARY-205).
  Error opening shared library libpng14-14.dll : %1 is not a valid Win32 application. .
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

Restarts:
 0: [RETRY] Try loading the foreign library again.
 1: [USE-VALUE] Use another library instead.
 2: [RETRY] Retry SLIME REPL evaluation request.
 3: [*ABORT] Return to SLIME's top level.
 4: [ABORT-BREAK] Reset this thread
 5: [ABORT] Kill this thread

Backtrace:
  0: (CFFI::FL-ERROR "Unable to load foreign library (~A).~%  ~A" #:LIBRARY-205 "Error opening shared library libpng14-14.dll : %1 is not a valid Win32 application. .")
  1: ((:INTERNAL CFFI::%DO-LOAD CFFI::%DO-LOAD-FOREIGN-LIBRARY) #<CFFI:FOREIGN-LIBRARY #x210144BFED> #:LIBRARY-205 "libpng14-14.dll")
  2: (CFFI:LOAD-FOREIGN-LIBRARY "libpng14-14.dll" :SEARCH-PATH NIL)
  3: (CCL::CALL-CHECK-REGS CFFI:LOAD-FOREIGN-LIBRARY "libpng14-14.dll")
  4: (CCL::CHEAP-EVAL (CFFI:LOAD-FOREIGN-LIBRARY "libpng14-14.dll"))
  5: (SWANK::EVAL-REGION "(cffi:load-foreign-library \"libpng14-14.dll\")\n")
  6: ((:INTERNAL SWANK::REPL-EVAL))
  7: (SWANK::TRACK-PACKAGE #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::REPL-EVAL) #x21012B1FEF>)
  8: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::REPL-EVAL) #x21012B206F>)
  9: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::REPL-EVAL) #x21012B20AF>)
 10: (SWANK::REPL-EVAL "(cffi:load-foreign-library \"libpng14-14.dll\")\n")
 11: (CCL::CALL-CHECK-REGS SWANK:LISTENER-EVAL "(cffi:load-foreign-library \"libpng14-14.dll\")\n")
 12: (CCL::CHEAP-EVAL (SWANK:LISTENER-EVAL "(cffi:load-foreign-library \"libpng14-14.dll\")\n"))
 13: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(cffi:load-foreign-library \"libpng14-14.dll\")\n") "COMMON-LISP-USER" 38)
 14: (SWANK::PROCESS-REQUESTS NIL)
 15: ((:INTERNAL SWANK::HANDLE-REQUESTS))
 16: ((:INTERNAL SWANK::HANDLE-REQUESTS))
 17: (SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK #<Compiled-function SWANK:SWANK-DEBUGGER-HOOK #x21007251EF> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL SWANK::HANDLE-REQUESTS) #x2100AB3BEF>)
 18: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #<SWANK-BACKEND::SLIME-OUTPUT-STREAM #x2100AB2A7D>) (*STANDARD-INPUT* . #<SWANK-BACKEND::SLIME-INPUT-STREAM #x2100AB2E3D>) ..))) #<CCL:COMPILED-LEXICAL..
 19: (SWANK::HANDLE-REQUESTS #<CONNECTION #x210099BC7D> NIL)
 20: (CCL::RUN-PROCESS-INITIAL-FORM #<PROCESS repl-thread(10) [Active] #x2100AA1CCD> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x2100AA1A6F>))
 21: ((:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS))) #<PROCESS repl-thread(10) [Active] #x2100AA1CCD> (#<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%PROCESS-RUN-FUNCTION) #x2100AA1A6F>))
 22: ((:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION))

Should it be 'cause I am using x64 version of Clozure Cl ?