title: Translate to Objective-C from Objective-C++
body: <p>I have this code in a .mm</p>
  
  <p><code>void MyMIDINotifyProc(const MIDINotification *message, void *refCon);</code></p>
  
  <p>which goes with this line</p>
  
  <p><code>MIDIClientCreate((CFStringRef)@"MidiMonitor MIDI Client", MyMIDINotifyProc, self, &amp;client);</code></p>
  
  <p>and then the MyMIDINotifyProc gets called from CoreMIDI.</p>
  
  <p>Without changing the file extension to .m, I translated to an Obj-C signature:</p>
  
  <pre><code>@interface MidiInput (Private) 
      -(void) MyMIDINotifyProc:(const MIDINotification *)message reference:(void *)refCon;
  @end
  </code></pre>
  
  <p>which compiles, but then I have no idea what to do with the <code>MIDIClientCreate</code> line. As is, it produces <code>"MyMIDINotifyProc" was not declared in this scope</code>. It's supposed to be of type <code>void *</code>... And the docs are 100% clear that it's <code>A refCon passed back to notifyRefCon</code> (<a href="http://developer.apple.com/library/ios/#documentation/CoreMidi/Reference/MIDIServices_Reference/Reference/reference.html" rel="nofollow">link</a>).</p>
  
  <p>Is this problem solvable in Obj-C alone? I imagine I'd have to translate the C++ stuff to C, in which case I would just leave it alone. </p>