Is it possible to use Ctypes to decompose the value of a C struct that is stored in an OCaml string? I’m not familiar in detail with Ctypes but the normal use case is that one calls a C function which returns a pointer to a struct which then is made accessible to OCaml. Here the value is already in an OCaml string and I would like to decompose it.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Ctypes and structs containing strings | 4 | 1755 | April 6, 2018 | |
| Ctypes pass OCaml bytes to C functions? | 6 | 1992 | June 17, 2018 | |
| How to pass an OCaml cstruct (or Bigarray) to C? | 1 | 483 | May 4, 2020 | |
| Learning Ctypes | 2 | 223 | June 30, 2025 | |
| Using ctypes to bind C functions returning pointers to get arrays | 2 | 725 | August 18, 2023 |