How to Declare DLL in VB6? - TechRepublic
General discussion
May 12, 2002 at 05:29 PM
ohjani

How to Declare DLL in VB6?

by ohjani . Updated 23 years, 11 months ago

my ActiveX DLL is called “TestDLL.dll”
inside the DLL, there is one class called “clsTestDLL”. in this class there is a sub called “PopMessageBox”, something like this:

Public Sub PopMessageBox()
Call MsgBox(“Hello World”)
End Sub

How do iwrite my Declare statement in order to call this DLL? i’ve tried the following, it didn’t work.

‘==========================================
Declare Sub PopMessageBox Lib “C:\PRG\Test DLL\TestDLL.dll” ()

Sub main()
PopMessageBox
End Sub
‘===========================================

The error message said something abt couldn’t find the DLL entry point.

This discussion is locked

All Comments