\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Installation / Documentation > declaring standard dll's in vb6


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
Hi, I am trying to call a .NET dll in VB6, and I am getting a "Cannot find entry point" error. I\'ve got something like this:
\r\n
\r\nPrivate Declare Function GetJunk Lib "C:\\location\\net.dll" (ByVal mystuff as string) as integer
\r\n
\r\nPrivate Sub dostuff ()
\r\n Dim result as integer
\r\n result = GetJunk("Burrito")
\r\nEnd Sub
\r\n
\r\nUnfortunately I cannot recreate the DLL.
\r\n
\r\n1st question) Is the problem with the function name GetJunk at the declaration? Or is it the way that I call the GetJunk funtion in the sub?
\r\n
\r\n2nd Question) What if when the dll was created there are two funcitons of the same name but under two different classes? There isn\'t a way to tell the declartion that this function comes from a certain class?
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; // next/previous post info pn[1390828] = "1390828,1390828"; pn[0] = ",1390828"; // cached usernames pu[0] = guestphrase; pu[228514] = "thewallrus"; // -->
Prev Previous Post   Next Post Next
  #1  
Old 02-19-2012, 11:01 PM
thewallrus thewallrus is offline
Newcomer
 
Join Date: Feb 2012
Posts: 1
Default declaring standard dll's in vb6


Hi, I am trying to call a .NET dll in VB6, and I am getting a "Cannot find entry point" error. I've got something like this:

Private Declare Function GetJunk Lib "C:\location\net.dll" (ByVal mystuff as string) as integer

Private Sub dostuff ()
Dim result as integer
result = GetJunk("Burrito")
End Sub

Unfortunately I cannot recreate the DLL.

1st question) Is the problem with the function name GetJunk at the declaration? Or is it the way that I call the GetJunk funtion in the sub?

2nd Question) What if when the dll was created there are two funcitons of the same name but under two different classes? There isn't a way to tell the declartion that this function comes from a certain class?
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->