<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>This may be a question with an obvious answer, but I'm having trouble understanding the manual.</p>
<p><br>
</p>
<p>I have two code bases, one in OCaml and one in C (c++, actually, but I'll just be using "extern 'C'" when needed), that I need to pass information to and from.</p>
<p><br>
</p>
<p>I have a Module in the OCaml code and all I want to do is to pass it to a C constructor that will just wrap around it.  I don't ever need to touch the data in C.  </p>
<p><br>
</p>
<p>What will happen is that eventually the C code will get to a point where it needs to perform some operation on two of these data types.  That operation is all ready written in the OCaml code so I then want to be able to pass  the stored values back into
 OCaml which will perform the operation needed and create a new module of the same type that will again be returned and wrapped in C.  I'm pretty sure I understand how to call an OCaml function from C, so that isn't an issue.</p>
<p><br>
</p>
<p>So I guess the meat of my question is how do I pass a value in OCaml to C and just create a wrapper around it in a way that I can pass the same value back when I call OCaml from C using ctypes?  I feel like this should be simple and obvious from the manual,
 but my OCaml understanding is very weak.</p>
<p><br>
</p>
<p>Any help is appreciated,</p>
<p>Emma</p>
</div>
</body>
</html>