Ok, I'll clarify my statement - the header file is incorrect
I'll just pick one command to demonstrate - the dbRight function that you used.
Here's are the lines that have anything to do with that function:
static LPSTR (*Import1250)( LPSTR, int ); // dbRight
//...
*((void **)&Import1250) = GetProcAddress( mod, "?Right@@YAKKKH@Z" );
//...
LPSTR dbRight( LPSTR p1, int p2 ){
return Import1250( p1, p2 );
}
Using the same coding convention, the code should be changed as follows:
static LPSTR (*Import1250)( LPSTR, LPSTR, int ); // dbRight
//...
*((void **)&Import1250) = GetProcAddress( mod, "?Right@@YAKKKH@Z" );
//...
LPSTR dbRight( LPSTR p1, int p2 ){
return Import1250( 0, p1, p2 );
}
See the extra parameter?
And just to follow that up, here's the output from a utility provided by Microsoft that decodes the exported function name (Used in the GetProcAddress call):
$ undname ?Right@@YAKKKH@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation 1981-2001. All rights reserved.
Undecoration of :- "?Right@@YAKKKH@Z"
is :- "unsigned long __cdecl Right(unsigned long,unsigned long,int)"
That shows 3 parameters, not 2 - the first is the old string that is being replaced.