If the C++ argument is int, it must be Long for VB.

This is because in C (and therefore C++), an int is the size of the system word, which on 32-bit systems is 4 bytes, equivalent to long. In VB the Integer type is still only 2 bytes, so you must use Long.