Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The procedure entry point RealEarInsertionGain could not be located in

Status
Not open for further replies.

emzee

Programmer
Dec 11, 2007
5
US
I'm trying to use a dll in a Delphi 5 project and am getting the error message:

"The procedure entry point RealEarInsertionGain could not be located in the dynamic link library NALNL1.dll"

I followed the documentation and created the following procedure in my unit:
procedure RealEarInsertionGain; stdcall; external 'NALNL1.dll'; // I removed the arguments for clarity's sake..

When I view the dll using Dependency Walker, I see that the function is:
_RealEarInsertionGain@40

which of course is not the same as what the documentation details. Now, of course I cannot use an '@' symbol in a procedure name, so my question is, does anyone have an idea on how I could link to this dll? It is not an importable type library.

The documentation provides the following for using the dll in C++ Builder:

To each file that uses a NALNL1.DLL function add the line

#define DllImport extern "C" __declspec ( dllimport )

near the top of the file. i.e. outside any functions.

Now add the header lines for the functions you wish to use in the file, also outside any function.

e.g. DllImport int WINAPI RealEarInsertionGain( double REIR[19], int AC[9], int BC[9], int L,

int limiting, int channels, int direction, int mic, int ACother[9], int noOfAids );

TIA!
 
Code:
procedure RealEarInsertionGain; stdcall; external 'NALNL1.dll';

From what you posted, if this library comes from C/C++, you will probably need to use "cdecl" instead of "stdcall". Try changing that and see what happens.
 
Thanks Glenn
I should have mentioned that I did try that too, and that the results were the same, as in no go...

I don't know how I am supposed to call a dll procedure that has characters that Delphi rejects, like the '@' symbol in the name of the procedure when viewed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top