, the declaration of the C++ method must be
... byref myValue as Long, ...
that says that myValue must be passed as reference (internally VB
will pass the pointer of the value) When calling it:
dim myVal as Long
...(... , myval, ....)
Hope it's clear enough
PS you did not specify if the integer was a VB
(16 bits) or C++ (32 bits) In my example I presumed was a int32.