A 64-bit variable from VBA to VC++ dll and back to VBA

Y

yanne81

Greetings,

I've been wondering for quite some time now on how to do 64-bit
operations on VBA and I have found some advice as well but all of them
are about operating on 64-bit variables inside VBA or getting a 64-bit
variable out of a VC++ dll. In these cases it's usually enough that you
multiply by 10 000 and the decimals go away but how about if you want
to send a 64-bit from VBA to a function in a dll and then get a 64-bit
result back from the dll and show it correct on a excel sheet for
example?

I tried this using VBA's currency data type and long long in vc++ but
somewhere along the way back to VBA the variable turns into something
totally different than what you'd expect it to be. It seems also a bit
challenging with negative 64-bit numbers.

If anybody has any information concerning my problem I would be very
glad to know about it. If you have any links to articles about vba's
and vc++'s data types being used together that would be great too.

yanne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top