Cal Dll was written by VC++ in VB

  • Thread starter Thread starter Zicovn
  • Start date Start date
Z

Zicovn

Hi, I want to call a function int* TestCall(int ref1,int
&ref2,int n) in <MyDll.dll> file.That was written in VC++6.0. How can i
call this function in VB.
Please help me!
Thanks!
 
Hai,
Add a reference to the DLL file by Right Clicking the project name in
the solution explorer. Once the reference is set, you should be able to
call the function TestCall..You might have to even register the DLL
file using RegSvr32.exe from .NET command prompt..

Hope it helps.
 
Hi ,Peter
My proplem is not how to call Dll function in VB, my strong problem
is how to declare pointer in VB6 that is returned fron function.
Please help me,thanks
 
Unfortunately, there are several choices how this could be translated:
1) if a single pointer is returned, you could return an 'IntPtr'
2) if the pointer points to multiple integers, declare the function as
returning 'integer array'.
Can you show us how it's used in existing C++ code?
Good luck!
george
http://code2code.net - C++ to C# and VB.Net translation engine
 
Hi Gmou,
My pointer i said below points to the first element of interger
array.In "MyDll.dll" file have a function declared that int*
TestCall(int ref1,int ref2,int & n). Variable 'n' is the size of array
and function returned pointer that point to the first element in that
array.Can you tell me how to decalre function in VB6 that reference
from this C++ Dll function.I have to declare this function in VB6 to
use this Dll file.Please help me,thanks you so muck !
 
Back
Top