reaper-rs icon indicating copy to clipboard operation
reaper-rs copied to clipboard

`Main_SaveProjectEx` is not loaded.

Open Levitanus opened this issue 3 years ago • 2 comments

I'm not sure, where the issue corresponds to: reaper-low, CPP API or somewhere else.

I definitely used this function from Python 2-3 years ago. And I think, it exists with REAPER at least from the version 5. But now ApiExists("Main_SaveProjectEx") returns false and reaper_low falls by reason the function is not loaded. I'm not sure whether I'm able to investigate this issue.

update: I've checked, that REAPER exports this function on my machine, and it runs from Python.

Levitanus avatar Nov 15 '22 19:11 Levitanus

I've never used "ApiExists()" and I think it's more intended for dynamic languages than for C++/Rust. In C++ you would simply check if the function pointer is not null. In Rust, this translates to: reaper.low().pointers().Main_SaveProjectEx.is_some()

Bonus: Unlike ApiExists(), it's type-safe :D

helgoboss avatar Nov 18 '22 06:11 helgoboss

But, the case is not in ApiExists, but in the MainSaveProjectEx, which does not work particularly in rust.

Levitanus avatar Nov 18 '22 10:11 Levitanus