resolved by returning a HRESULT and moving the Database* as the last parameter (out, retval)
VB6 see it as a function that return a Database*
i have another question
how can i return small errors numbers like the DAO360.DLL do, instead of 0x80000000+
if i don't set the first bit of the HRESULT to 1, VB6 don't see it as a error