How to set function address of C++ class method for non-C++ function calls?
<p>The openssl library provides a way to write your own BIOs. Essentially you load a struct of function pointers to read, write, create, destroy, etc, routines that the openssl lib will use. </p>

<p>I am trying of wrap this functionality in a C++ class. openssl has routines to set the function pointers of the structure it uses, like:</p>

<pre><code>BIO_meth_set_read(pBIOMethod, my_function_for_read); 
</code></pre>

<p>Question: can I use a class method for my_function_for_read?  In other words, can the address of a class method be invoked as a regular function in an external library that is C-based?</p>

<p>I am not sure if the class vtable is used if I take the address of just that class method.</p>

<p>Thanks,
-Andres </p>