Solved

Can't find DLL entry point / VB6

Posted on 2006-07-10
4
1,922 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

828 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