Solved

Can't find DLL entry point / VB6

Posted on 2006-07-10
4
2,004 Views
Last Modified: 2012-06-22
Hi,

I'm calling a function from a dll written in C++ Borland 5.02 as follows:
declaration:
   Declare Function UpgradeTables Lib "emUpgradeDB.dll" (ByVal Region_English As Integer) As Long

call:
  dim Result as long
  Result = UpgradeTables(92)

In C++ the function is declared as follows:

   extern "C" int FAR _export UpgradeTables (int languageID)

The result is 'Run-Time error '453': Can't find DLL entry point UpgradeTables in emUpgradeDB.dll

Can anybody tell me what the problem could be?

Thanks!
0
Comment
Question by:ecomaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 17074969
Make sure the dll is in the system32 directory. The way your declaring the DLL if your debuging in the IDE its going to look for the DLL in the system32 directory.

However when you disturbute your application your exe will first look in the application path and then the system32 directory for your DLL as you have it declared above.

Also make sure the exported function is spelled correctly, because its case sensitive.
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17075934
Make sure the dll has a correct DEF file in... Also, if its a syntax error maybe the C++ TA could help you out...
0
 
LVL 8

Accepted Solution

by:
kaliyugkaarjun earned 500 total points
ID: 17079297
0
 

Author Comment

by:ecomaster
ID: 17079483
Hi,

thanks, kaliyugkaarjun. On the site you mentioned I found the solution. I declared according to:

     Declare Function UpgradeTables Lib "emUpgradeDB.dll" Alias "_UpgradeTables" (ByVal Region_English As Integer) As Long

and it works.

Many thanks !!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Excel VBA, find a string in a column, update a cell 7 118
MsgBox 4 76
VBA Replace Function - What am I missing? 3 52
Userform to show a range in excel. 3 34
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question