Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This site is truly a marvel. Without a doubt the most comprehensive, friendly and just plain useful resource of its kind..."

Geography

Where in the world do Tek-Tips members come from?
SimonSellick (Programmer)
21 Apr 10 7:19
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.
BobRodes (Instructor)
19 May 10 23:24
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.

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!

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