KeyGenerator 2.1c3 :
- aggiunta restituzione codice di errore (0=ok, 1=errore) dall'eseguibile.
This commit is contained in:
+14
-3
@@ -56,9 +56,9 @@ CKeyGeneratorApp::InitInstance( void)
|
||||
{
|
||||
// CommonControls initialize
|
||||
INITCOMMONCONTROLSEX InitCtrls ;
|
||||
InitCtrls.dwSize = sizeof(InitCtrls) ;
|
||||
InitCtrls.dwSize = sizeof( InitCtrls) ;
|
||||
InitCtrls.dwICC = ICC_WIN95_CLASSES ;
|
||||
InitCommonControlsEx(&InitCtrls) ;
|
||||
InitCommonControlsEx( &InitCtrls) ;
|
||||
|
||||
CWinApp::InitInstance() ;
|
||||
|
||||
@@ -85,8 +85,10 @@ CKeyGeneratorApp::InitInstance( void)
|
||||
// verifico la protezione
|
||||
SetLockType( KEY_LOCK_TYPE_HW) ;
|
||||
string sKey = GetPrivateProfileStringUtf8( "General", "Key", "", m_pszProfileName) ;
|
||||
if ( VerifyKey( sKey, 823, 16, 10) != KEY_OK)
|
||||
if ( VerifyKey( sKey, 823, 16, 10) != KEY_OK) {
|
||||
m_nExitCode = 1 ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
// gestione linea di comando
|
||||
int nFlag = 0 ;
|
||||
@@ -102,9 +104,18 @@ CKeyGeneratorApp::InitInstance( void)
|
||||
dlg.DoModal() ;
|
||||
|
||||
// Per uscire dall'applicazione
|
||||
m_nExitCode = 0 ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
CKeyGeneratorApp::ExitInstance( void)
|
||||
{
|
||||
CWinApp::ExitInstance() ;
|
||||
return m_nExitCode ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
string
|
||||
GetExeNameVer( void)
|
||||
|
||||
+5
-1
@@ -27,9 +27,13 @@ class CKeyGeneratorApp : public CWinApp
|
||||
CKeyGeneratorApp( void) ;
|
||||
|
||||
public :
|
||||
virtual BOOL InitInstance( void) ;
|
||||
BOOL InitInstance( void) override ;
|
||||
int ExitInstance( void) override ;
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private :
|
||||
int m_nExitCode ;
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user