PDA

Click to See Complete Forum and Search --> : ActiveXDLL


GerryQuinn
Dec 8th, 1999, 03:16 AM
I've created a function. I want to create the DLL so it can be called within another project at run-time. It's an ActiveX DLL in VB5 SP3.

Private Declare Function DisplayText Lib "c:\ProjGerry.dll" (ByVal r As String) As Boolean

r = DisplayText("gerry")

It's just a small thing to display text. I'm just trying to get it to work.

Now, the functin is inside a Class object. The object is set to GlobalMultiUse. So the object should be created automatically. So I can just reference function like normal.

Can someone help please!
I get this error. Seems common, but doesn't really answer my problem..


Run-time Error '453'
Can't find DLL entry point DisplayText in c:\ProjGerry.dll.

Help!!

Thanks,
Gerry

Joacim Andersson
Dec 8th, 1999, 03:37 AM
You don't use the Declare statement with ActiveX DLL files. You have to set a reference to your DLL (click references on the project menu and check your file).

It's true that a Global Multi Use object is created by itself but you still have to use the object to call the function:

YourObjectName.DisplayText("Gerry")

Just as you would with other Global Multi Use objects like Screen, Printer, Clipboard, App and so on.

Good luck!

------------------
Joacim Andersson
joacim@programmer.net
joacim@yellowblazer.com
www.YellowBlazer.com (http://www.YellowBlazer.com)

GerryQuinn
Dec 8th, 1999, 04:26 AM
I understand.
I had :
dim r as new myobject
r.displaytext("Gerry").

What type of prject in VB can I write to include it as a DECLARE. It needs to be called @ run-time.

Question. If I have it as a reference. I then update the dll. How does this affect Binary Compatibility. Versioning, etc....