You must understand the difference between managed and unmanaged code. User library is in an unmanaged space, and your code - in managed. Combine them possible, but difficult. Special language created for this: C++/CLI.
Here you can see how it looks: https://smath.info/svn/public/plugins/mcadefi/mcaduser/
I recommend the use of automation, as indicated above. You can use it in VB.Net. To do this, add the Mathcad Automation API to your project and save the image as Mathcad.MatrixValue.