mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
Don't open localization .dll if version is missing or wrong.
This commit is contained in:
parent
4524f0fd84
commit
3a6e7013b6
1 changed files with 10 additions and 1 deletions
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue