Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL entry point invisible

Status
Not open for further replies.

SimonSellick

Programmer
Nov 3, 2003
305
GB
Hi,

Sorry if this is a trivial one - it seems a bit different from the FAQ on the subject.

I want to call a VB6 DLL from a .net app. The .net part all seems OK, but it complains that it cannot find the entrypoint asked for. I have tried calling it from a VB6 app and get the same result, so the problem must be that the entrypoint is not visible.

The DLL is an ActiveX DLL project containing a Class. The Class defines a static method 'reverse' that accepts a string and returns it reversed.

If I create a VB6 project and add a reference to the DLL it does not show the 'reverse' entry point. Is there a simple way to fix this?

Source of the DLL follows.
Code:
' T1.cls - test DLL project called from .net.
'
' v001 21/04/10 Simon Sellick   - initial version.

Option Explicit

Public Static Function reverse(s As String) As String

    reverse = StrReverse(s)
    
End Function

' end
Any help appreciated.
 
Static in VB6 is not the same thing as Static in .Net. In VB6, it means that all variables inside the function are static. Static means that the variables' values persist between function calls. So, very different meaning.

If you want to approximate the meaning of Static in .Net, set the Instancing property to one of the Global values. See for more information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top