Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   C++ Long, and Visual Basic Long (http://www.programmingforums.org/showthread.php?t=5454)

rpg_code_master Aug 18th, 2005 6:35 PM

C++ Long, and Visual Basic Long
 
Hello

I am interfacing a VB ActiveX DLL with C++ via COM. It compiles and links, but it does not run correctly. I can successfully get the desired interface via CoCreateInstance. When I try though, to pass a Long into one of the VB interfaced functions, I get a 'Cannot read from 0x...' error. Have you any ideas as to why? Maybe a C++ Long != a VB Long…?

Thank you

Scorpions4ever Aug 18th, 2005 7:36 PM

On a 32 bit VC++ compiler, VC++ long = VB Long.

The Dark Aug 19th, 2005 3:09 AM

Is the VB function parameter passed by reference or passed by value? It may be that you are passing the value of the long and the VB DLL is trying to treat it as an address.


All times are GMT -5. The time now is 5:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC