On this page:
ffi2-lib?
ffi2-lib
ffi2-lib-ref
9.2.0.3

2.1 Foreign Libraries🔗ℹ

procedure

(ffi2-lib? v)  boolean?

  v : any/c
Returns #t if v is a foreign-library value, #f otherwise.

The ffi2-lib? predicate is equivalent to ffi-lib? from ffi/unsafe.

procedure

(ffi2-lib path    
  [version    
  #:get-lib-dirs get-lib-dirs    
  #:fail fail    
  #:global? global?    
  #:custodian custodian])  any
  path : (or/c path-string? #f)
  version : (or/c string? (listof (or/c string? #f)) #f) = #f
  get-lib-dirs : (->/c (listof path?)) = get-lib-search-dirs
  fail : (or/c #f (->/c any)) = #f
  global? : any/c = (eq? 'global (system-type 'so-mode))
  custodian : (or/c 'place custodian? #f) = #f
Equivalent to ffi-lib from ffi/unsafe.

The result is normally a foreign-library value value recognized by ffi2-lib?, but the result can be anything if fail is called to produce a result.

procedure

(ffi2-lib-ref name lib [#:fail fail])  any

  name : (or/c string? bytes? symbol?)
  lib : (or/c ffi2-lib? #f)
  fail : (or/c (->/c any) #f) = #f
Gets the address for name as exported by the foreign library lib. If lib is #f or if no such export is found, the fail is called to produce the result, or an exception is raised if fail is #f.

The result is normally a pointer recognized by ptr_t?, but the result can be anything if fail is called to produce a result.