View Single Post
Old 01-20-2018, 10:46 AM   #292
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

How do I properly add extra Reaper API functions into csurf.h and csurf_main.cpp files?
The official Reaper extentions SDK files are from 2009 and there were lots of api functions added, since.

For example, I need to send
Undo_DoRedo2(ReaProject* proj)
and
Undo_DoUndo2(ReaProject* proj)
on midi commands from the surface.

Simply adding int (*Undo_DoUndo2)(); line to csurf_main.cpp and extern int (*Undo_DoUndo2)(ReaProject *proj); to csurf.h didn't work. I followed the way of how other functions were declared in those files.


UPD. My csurf.h additions:

csurf_main.cpp:

csurf_sl.cpp:


Pressing the assigned button throws exception error in VS:


Calling CSurf_OnPlay() function, that was already present in both .h and .cpp files, works fine, when called by the surface.

Last edited by fundorin; 01-20-2018 at 11:27 AM.
fundorin is offline   Reply With Quote