This describes in full detail how I access C++ procedures from Python in Rhino.
I find getting Visual Studio to work correctly for creating a C++ DLL callable from Rhino to be the hardest step. I am currently using Visual Studio 2022 with a Visual Studio 2019 toolset as this gives me access to VS 22 improvements while still working with Rhino.