View Single Post
Old 10-18-2019, 02:11 AM   #60
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Trying to add the "API::" code I get the error messages
" 'API': is not a class or namespace name "
" 'construct': identifyer not found " (obviously)
" function 'int ReaperPluginEntry(HINSTANCE,reaper_plugin_info_t *)' already has a body" (I understand I need to integrate the "API::" code in the existing "REAPER_PLUGIN_ENTRYPOINT" function, but with this "API" till is unknown )

But nonetheless I happily experience a kind of success !!!
I added
Code:
  #define REAPERAPI_IMPLEMENT
  #define REAPERAPI_MINIMAL  
  #define REAPERAPI_WANT_SetExtState
  #define REAPERAPI_WANT_Main_OnCommand
  #define REAPERAPI_WANT_InsertMedia
  #define REAPERAPI_WANT_GetProjectPath
  #define REAPERAPI_WANT_GetResourcePath
  #define REAPERAPI_WANT_GetExtState
  #define REAPERAPI_WANT_HasExtState
  #undef  IMPAPI
  #define IMPAPI(x) x
to the source code of the miniimal extension.

It does happily compile !
So I renamed the dll to reaper_re_test.dll.

When I now start Reaper it crashes.

In the crash dialogue I can start the debugger and Visual Studio comes up correctly with my dll Prokect and supposedly correctly shows an "unhandled exception" in the line
Code:
  const char* numberString = GetExtState("simple_extension", "toggleaction_state");
So obviously the back-link from the dll to Reaper is not installed because I was not able to add the "API::" code snippet.

-Michael

Last edited by mschnell; 10-18-2019 at 02:23 AM.
mschnell is online now   Reply With Quote