Link to home
Start Free TrialLog in
Avatar of alexgor
alexgor

asked on

Question abou Visual Basic DLL

1. I have DLL function that was created for Visual Basic.
2. I know how can i to use this function in Visual Basic,
   simply by following declaration:
   Private Declare Function myName Lib "libname" () As type
3. How can i to define this DLL function in Microsoft
   Visual C++ 5.0???
   I don't have sources of the DLL.
4. Thank you very much in advance.
Avatar of clifABB
clifABB

If the dll was created specifically for VB, odds are that you cannot use it in C++.  VB uses string pointers in an odd way that C++ doesn't support.

If your DLL is an ActiveX DLL you do not need to declare it, you just set a reference to it.


ASKER CERTIFIED SOLUTION
Avatar of Mirkwood
Mirkwood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alexgor

ASKER

To Mirkwood.
After i create active x how can define my function in the
C++.
Thank you very much.
You cannot easily
You have to connect to it using a COM mechanism for example ATL...

Choose project/add to project/ component and controls and select the TstClass as mentioned in my example


alexgor:
If, as you state in your original question, you use your dll in VB by declaring the function(s), then it is not an ActiveX dll.