![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
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 |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Jun 2005
Posts: 86
Rep Power: 4
![]() |
On a 32 bit VC++ compiler, VC++ long = VB Long.
|
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 882
Rep Power: 4
![]() |
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|