int InitMsg( void ) { char buff[_MAX_PATH]; #if defined( IDE_PGM ) || !defined( __WATCOMC__ ) char imageName[_MAX_PATH]; #else char *imageName; #endif hInstance.handle = NIL_HANDLE; #if defined( IDE_PGM ) _cmdname( imageName ); #elif !defined( __WATCOMC__ ) get_dllname( imageName, sizeof( imageName ) ); #else imageName = _LpDllName;; #endif BannerPrinted = false; if( !OpenResFile( &hInstance, imageName ) ) { if( !FindResources( &hInstance ) && !InitResources( &hInstance ) ) { MsgShift = _WResLanguage() * MSG_LANG_SPACING; if( Msg_Get( MSG_PRODUCT, buff ) ) { Res_Flag = EXIT_SUCCESS; return( Res_Flag ); } } CloseResFile( &hInstance ); hInstance.handle = NIL_HANDLE; } WriteStdOutInfo( NO_RES_MESSAGE, ERR, NULL ); Res_Flag = EXIT_FAILURE; return( Res_Flag ); }
bool InitMsg( void ) { char msg_buff[RESOURCE_MAX_SIZE]; #if defined( IDE_PGM ) || !defined( __WATCOMC__ ) char imageName[_MAX_PATH]; #else char *imageName; #endif #if defined( IDE_PGM ) _cmdname( imageName ); #elif !defined( __WATCOMC__ ) get_dllname( imageName, sizeof( imageName ) ); #else imageName = _LpDllName;; #endif BannerPrinted = false; hInstance.status = 0; if( OpenResFile( &hInstance, imageName ) ) { MsgShift = _WResLanguage() * MSG_LANG_SPACING; if( Msg_Get( MSG_GENERAL_HELP_0, msg_buff ) ) { return( true ); } } CloseResFile( &hInstance ); WriteStdOutInfo( NO_RES_MESSAGE, ERR, NULL ); return( false ); }