Error 3260--Could not find the entrypoint---DLL

G. Briggs

New Member
Hello,

I am fairly new to the world of calling DLL's from Progress. So I apologize in advance if the answer to my question is blatently obvious.

I have a DLL to which I need to pass parameters from Progress.
The DLL (which was developed using VB 6.0 )is single threaded and composed of 3 class modules. I have verified the spelling of my procedure in my VB code but when I run Progress I get error 3260 saying that the entrypoint could not be found. I have registered the DLL with regsvr32.exe. Also the class in which the DLL interface resides has it's Instancing property set to 5-MultiUse.

Here is the actual code:

NOTE: The values of c1 through c8 are being passed
to the .p by a .w in Appbuilder. (Assigns are being done in the
calling procedure).

================================

Progress code

================================

DEF INPUT PARAMETER c1 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c2 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c3 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c4 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c5 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c6 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c7 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c8 AS CHAR NO-UNDO.




RUN BeginConversionPub(INPUT c1, INPUT c2, INPUT c3, INPUT c4, INPUT c5, INPUT c6, INPUT c7, INPUT c8).

PROCEDURE BeginConversionPub EXTERNAL "ProgressToAccess.dll":

DEF INPUT PARAMETER c1 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c2 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c3 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c4 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c5 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c6 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c7 AS CHAR NO-UNDO.
DEF INPUT PARAMETER c8 AS CHAR NO-UNDO.

END PROCEDURE.

===================================
//////////////////////////////////////////////////////////////
===================================

DLL interface in VB

===================================

Option Explicit






Dim clsrun As Main_class


Sub BeginConversionPub(strFromTxtFileName As String, strtodbpath As String, _
strtodatabasename As String, strdbpassword As String, strtoTableName As String, strtoFilePath As String, blnDummyRecord As String, blnCopyArchive As String)

Set clsrun = New Main_class


If clsrun.main(strFromTxtFileName, strtodbpath, strtodatabasename, strdbpassword, strtoTableName, strtoFilePath, blnDummyRecord, blnCopyArchive) = True Then

Else

MsgBox "Error calling subclass Main_class", vbCritical

Set clsrun = Nothing

End If

End Sub

===========================================
////////////////////////////////////////////////////////////////////////////
===========================================

Any assistance would be greatly appreciated. Have a great day.
 
DLL Compile

Not sure exactly what the problem is but it might be because the DLL was compiled differently than the Progress default expects.

When defining an external procedure in a DLL there are three options that Progress can use CDECL, PASCAL and STDCALL. My guess would be that STDCALL (the Progress default) is not correct. Try using the other 2 options.

If that fails try putting an "_" before the program name.

Things to try:

PROCEDURE BeginConversionPub EXTERNAL "ProgressToAccess.dll" CDECL:

PROCEDURE BeginConversionPub EXTERNAL "ProgressToAccess.dll" PASCAL:

PROCEDURE BeginConversionPub EXTERNAL "_ProgressToAccess.dll" CDECL:

PROCEDURE BeginConversionPub EXTERNAL "_ProgressToAccess.dll" PASCALL:

PROCEDURE BeginConversionPub EXTERNAL "_ProgressToAccess.dll" STDCALL:

Hope one one these works.


Jon
 

G. Briggs

New Member
Thanks, Jon.

That didn't seem to work, but it was a good idea.

I spoke with someone at Progress support, and they suggested using an Automation object and passing parameters to the object's method.

I have met with limited success. Progress seems to be communicating with the DLL. However, I am getting an Error 5890 -- Authentication error.

The DLL has been registered and works fine when called from another VB application.

Does anyone have any thougths?

Thanks
 
Memptr

Another possible problem could be the way Progress handles characters.

My suggestion would be to use a memory pointer instead (look at documentation on usage of MEMPTR, although there isn't much of it).

Other than this and the previous suggestion, I have no other ideas.
 

G. Briggs

New Member
It turns out that my error was due to a parameter not being set properly in the DLL I had created. Thanks again for you help.
 
Top