Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can't find DLL entry point / VB6

Posted on 2006-07-10
4
Medium Priority
?
2,246 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 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