I have found the solution. the problem was:
I had to call one method from a dll because I had integrate to my
system with the client's system, written in VB.
The solution I found was to generate another DLL in C++ importing the
JINI libraries. This DLL makes the call to the VB dll and brings the
return value to my class.