INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

DLL entry point invisible

DLL entry point invisible

(OP)
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.

RE: DLL entry point invisible

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 http://msdn.microsoft.com/en-us/library/aa241733(VS.60).aspx for more information.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close