Just thought of something. This is C's way of passing by reference. You might also try dim a as pointer libfptr_create(byref a) where the function has been declared byref; extern libfptr_create(byref a as pointer) Not sure it works for extern calls though, I've never tested it.