Don't open localization .dll if version is missing or wrong.

This commit is contained in:
ehouse 2009-05-11 01:55:47 +00:00
parent 4524f0fd84
commit 3a6e7013b6

View file

@ -21,6 +21,9 @@
#include "ceutil.h"
#include "cedebug.h"
static XP_U16 getDLLVersion( HINSTANCE hinst );
HINSTANCE
ceLoadResFile( const XP_UCHAR* file )
{
@ -30,8 +33,14 @@ ceLoadResFile( const XP_UCHAR* file )
VSIZE(widebuf) );
widebuf[len] = 0;
hinst = LoadLibrary( widebuf );
if ( CUR_DLL_VERSION != getDLLVersion( hinst ) ) {
FreeLibrary( hinst );
hinst = NULL;
}
return hinst;
}
} /* ceLoadResFile */
void
ceCloseResFile( HINSTANCE inst )