Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2333
  • Last Modified:

Can't find DLL entry point / VB6

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
ecomaster
Asked:
ecomaster
1 Solution
 
nffvrxqgrcfqvvcCommented:
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
 
justchat_1Commented:
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
 
kaliyugkaarjunCommented:
0
 
ecomasterAuthor Commented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now