Is there example documentation for doing something like this, if not could you create some?
Just google "How to embed C++ functions in RCBasic?" and the AI overview will explain how to do it. I just did that search and the AI results are correct.