KeyGenerator 2.1c3 :

- aggiunta restituzione codice di errore (0=ok, 1=errore) dall'eseguibile.
This commit is contained in:
Dario Sassi
2019-03-01 15:26:04 +00:00
parent 23f34defb5
commit df04d6a0f5
3 changed files with 19 additions and 4 deletions
+14 -3
View File
@@ -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
View File
@@ -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 ;
} ;
//----------------------------------------------------------------------------
BIN
View File
Binary file not shown.