first look here
1. bug
defined in dlls\h_export.cpp : (same as HPBT3)
Code:
#ifndef __linux__
#ifdef __BORLANDC__
extern "C" DLLEXPORT void EXPORT GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals)
#else
void DLLEXPORT GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
#endif
#else
extern "C" DLLEXPORT GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals )
#endif
ERROR : Under linux, GiveFnptrsToDll will not be returning void (?will return int?). This differs from the SDKs definition. Also definition under Borland looks very strange.
I've read many posts in old botmans forum regarding missing void type ("h_export.cpp: ISO C++ forbids declaration of `GiveFnptrsToDll' with no type"). This can be IMHO simply fixed by adding void return type to declaration of GiveFnptrsToDll() where it is missing.
2. bug, more serious
Defined in dlls\h_export.cpp :
Code:
#ifdef __BORLANDC__
extern "C" DLLEXPORT int EXPORT Server_GetBlendingInterface
( int version, struct sv_blending_interface_s **ppinterface,
struct engine_studio_api_s *pstudio, float (*rotationmatrix)[3][4],
float (*bonetransform)[MAXSTUDIOBONES][3][4] )
#else
int DLLEXPORT Server_GetBlendingInterface
( int version, struct sv_blending_interface_s **ppinterface,
struct engine_studio_api_s *pstudio, float (*rotationmatrix)[3][4],
float (*bonetransform)[MAXSTUDIOBONES][3][4] )
#endif
{
static SERVER_GETBLENDINGINTERFACE other_Server_GetBlendingInterface = NULL;
static bool missing = FALSE;
// if the blending interface has been formerly reported as missing, give up
if (missing)
return (FALSE);
// do we NOT know if the blending interface is provided ? if so, look for its address
if (other_Server_GetBlendingInterface == NULL)
other_Server_GetBlendingInterface = (SERVER_GETBLENDINGINTERFACE) GetProcAddress (h_Library, "Server_GetBlendingInterface");
// have we NOT found it ?
if (!other_Server_GetBlendingInterface) {
missing = TRUE; // then mark it as missing, no use to look for it again in the future
return (FALSE); // and give up
}
// else call the function that provides the blending interface on request
return ((other_Server_GetBlendingInterface) (version, ppinterface, pstudio, rotationmatrix, bonetransform));
}
***ERROR*** : This function is not exported under MSVC. DLLEXPORT macro is wrong and there is no declarator telling that this function should be exported. If this function will be exported by some miracle or .def file, it will crash whole Half-life for sure, because of wrong __stdcall calling convention. Calling convention for this function is __cdecl, which is default
.