I couldn't edit my original post.
The only thing I want to add to the previously exposed, is that I'm working based on the document "creating a user dll" that states that one can create a mathcad function from an external .dll archive.
I'm just not sure if this kind of function can be implemented in that way.