title: Turn a Callback into a Pointer in JNA
body: <p>I must be missing something. Given an instance of a class that implements <code>com.sun.jna.Callback</code>, how do I get a function pointer address as a <code>Pointer</code>, so that I can pass it to a function that takes a <code>void*</code> parameter (I’m using <code>Pointer</code>).</p>
  
  <p>Specifically, I want to create a <code>CFNumber</code> (aka <code>NSNumber*</code>) using <a href="https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFNumberRef/Reference/reference.html#//apple_ref/c/func/CFNumberCreate" rel="nofollow"><code>CFNumberCreate(Pointer, int, Pointer)</code></a> with the address of the function, so that I can call <a href="https://developer.apple.com/library/mac/documentation/Carbon/Reference/Speech_Synthesis_Manager/Reference/reference.html#//apple_ref/c/func/SetSpeechProperty" rel="nofollow"><code>SetSpeechProperty</code></a> to register a <a href="https://developer.apple.com/library/mac/documentation/Carbon/Reference/Speech_Synthesis_Manager/Reference/reference.html#//apple_ref/c/tdef/SpeechDoneProcPtr" rel="nofollow"><code>SpeechDoneProcPtr</code></a>.</p>