Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2004, 12:56 AM
Registered User
 
Join Date: Nov 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using a ActiveX DLL in a Standard EXE

I am having trouble accessing a ActiveX Dll in a standard exe.
I have complied the DLL and registered it, but every time I run it I get a "Specified Function not found (Error 453).
It is saying that it could not find the entry point of the function.
I am calling the DLL like a standard function
Here is the code that i am using to call it
"Private Declare Function addnum Lib "addme.dll" (ByVal FirstNumber As Double, ByVal SecondNumber As Double) As Double"

I do not know if I am setting the dll up wrong or if I am accessing it wrong.
Thanks for you help


 
Old November 12th, 2004, 09:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

if your dll is an standard vb dll you should include it in your project and then you can directly user the objects that are in there.. go to references in your project and add it.

HTH

Gonzalo
 
Old November 24th, 2004, 01:39 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Instead, set a reference to the DLL in the projects references.
In the DLL, create an exposed class. This class will be the entry point, and will be the means of refering to the library. If the class’ name is “clsClassy,” and it has a method (Sub or Function) or a property called “AddNum,” you would refer to that as clsClassy.AddNum.

No Declare would be used.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Advantages /Disadvantages of ActiveX DLL & ActiveX priyank Beginning VB 6 6 February 19th, 2007 11:34 AM
ActiveX.exe to standard exe Kaustav VB How-To 6 February 24th, 2006 12:10 AM
Calling an ActiveX.EXE in C++ xgbnow Visual C++ 4 March 31st, 2004 08:12 AM
unregister activeX exe gbianchi Pro VB 6 2 February 10th, 2004 03:17 PM
ActiveX Exe and Dll Vasudevan VB How-To 1 September 26th, 2003 07:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.