1234567891011121314151617181920212223242526272829(* This file is part of Luv, released under the MIT license. See LICENSE.md for
details, or visit https://github.com/aantron/luv/blob/master/LICENSE.md. *)typet=C.Types.DLL.tCtypes.ptrletopen_filename=letlib=Ctypes.(addr(makeC.Types.DLL.t))inletresult=C.Functions.DLL.open_(Ctypes.ocaml_string_startfilename)libinifresultthenNoneelseSomelibletclose=C.Functions.DLL.closeletsymlibname=letaddress=Ctypes.(allocate(ptrvoid)null)inletresult=C.Functions.DLL.symlib(Ctypes.ocaml_string_startname)addressinifresultthenNoneelseSome(Ctypes.(raw_address_of_ptr(!@address)))leterror=C.Functions.DLL.error