I've never done it but it is possible

Create your C++ code in a DLL or a COM object/server then create an instance of that in your VB program and just call the various methods when you need to.