ce0.cpp Aggiunti messaggio d'errore
sesadump.cpp Messo a 0 il WPARAM di WM_WAKEUP git-svn-id: svn://10.65.10.50/trunk@5723 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
23f30ca09d
commit
29dc209df8
41
ce/ce0.cpp
41
ce/ce0.cpp
@ -1,9 +1,10 @@
|
||||
#include <windows.h>
|
||||
#define STRICT
|
||||
#define XVT_INCL_NATIVE
|
||||
|
||||
#include <applicat.h>
|
||||
#include <filetext.h>
|
||||
#include <execp.h>
|
||||
#include <relation.h>
|
||||
#include <urldefid.h>
|
||||
#include <filetext.h>
|
||||
#include <isam.h>
|
||||
|
||||
#include <anagr.h>
|
||||
#include <anafis.h>
|
||||
@ -11,11 +12,10 @@
|
||||
#include <nditte.h>
|
||||
#include <unloc.h>
|
||||
|
||||
class TSESA_anagr : public TApplication
|
||||
class TSESA_anagr : public TSkeleton_application
|
||||
{
|
||||
protected:
|
||||
virtual bool menu(MENU_TAG mt);
|
||||
virtual bool create();
|
||||
virtual void main_loop();
|
||||
|
||||
public:
|
||||
bool is_sigla32() const;
|
||||
@ -27,8 +27,7 @@ bool TSESA_anagr::is_sigla32() const
|
||||
{
|
||||
char szBuffer[80];
|
||||
GetPrivateProfileString("SIGLAPP",
|
||||
"Driver32",
|
||||
"", szBuffer, sizeof(szBuffer), "odbc.ini");
|
||||
"Driver32", "", szBuffer, sizeof(szBuffer), "odbc.ini");
|
||||
return *szBuffer != '\0';
|
||||
}
|
||||
|
||||
@ -65,7 +64,7 @@ int TSESA_anagr::write(TLocalisamfile& file, bool re)
|
||||
return err;
|
||||
}
|
||||
|
||||
bool TSESA_anagr::menu(MENU_TAG mt)
|
||||
void TSESA_anagr::main_loop()
|
||||
{
|
||||
TFilename tmp; tmp.tempdir();
|
||||
TString cmdline(80);
|
||||
@ -78,7 +77,11 @@ bool TSESA_anagr::menu(MENU_TAG mt)
|
||||
TExternal_app app(cmdline);
|
||||
int err = app.run(FALSE,3);
|
||||
if (err != 0)
|
||||
return error_box("Impossibile eseguire il programma di scarico anagrafiche");
|
||||
{
|
||||
error_box("Errore %d nell'esecuzione del programma %s",
|
||||
err, (const char*)cmdline);
|
||||
return;
|
||||
}
|
||||
|
||||
TFilename txt = tmp; txt.add("ditte.txt");
|
||||
TFilename ini = tmp; ini.add("ditte.ini");
|
||||
@ -86,8 +89,10 @@ bool TSESA_anagr::menu(MENU_TAG mt)
|
||||
err = file.open('r');
|
||||
if (err != 0)
|
||||
{
|
||||
remove(ini); // Lo rimuove in caso lo crei vuoto il TConfig di TFile_text
|
||||
return error_box("Aggiornamento anagrafiche non effettuato");
|
||||
::remove(ini); // Lo rimuove in caso crei vuoto il TConfig di TFile_text
|
||||
error_box("Aggiornamento anagrafiche non effettuato:\n"
|
||||
"impossibile aprire il file %s", (const char*)txt);
|
||||
return;
|
||||
}
|
||||
|
||||
TLocalisamfile ditte(LF_NDITTE);
|
||||
@ -191,17 +196,11 @@ bool TSESA_anagr::menu(MENU_TAG mt)
|
||||
if (err != NOERR)
|
||||
error_box("Errore %d in scrittura\ndell'unita' locale della ditta %ld", err, codditta);
|
||||
}
|
||||
if (rig <= 1)
|
||||
warning_box("Non e' stata trasferita nessuna ditta");
|
||||
|
||||
remove(txt);
|
||||
remove(ini);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool TSESA_anagr::create()
|
||||
{
|
||||
dispatch_e_menu(BAR_ITEM(1));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
@ -88,8 +88,8 @@ BOOL CSesadumpApp::InitInstance()
|
||||
SESA_DumpTable(strTable);
|
||||
|
||||
const UINT WM_WAKEUP = RegisterWindowMessage("WAKEUP");
|
||||
const HTASK ht = 0; // GetCurrentTask();
|
||||
PostMessage(HWND_BROADCAST, WM_WAKEUP, (WPARAM)ht, 0L);
|
||||
//const HTASK ht = GetCurrentTask();
|
||||
PostMessage(HWND_BROADCAST, WM_WAKEUP, 0 /*(WPARAM)ht*/, 0L);
|
||||
|
||||
return FALSE; // Batch mode
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Microsoft Visual C++ generated build script - Do not modify
|
||||
|
||||
PROJ = SESADUMP
|
||||
DEBUG = 1
|
||||
DEBUG = 0
|
||||
PROGTYPE = 0
|
||||
CALLER =
|
||||
ARGS = ditte c:\temp\guy
|
||||
@ -10,7 +10,7 @@ D_RCDEFINES = /d_DEBUG
|
||||
R_RCDEFINES = /dNDEBUG
|
||||
ORIGIN = MSVC
|
||||
ORIGIN_VER = 1.00
|
||||
PROJPATH = C:\U\GUY\SESADUMP\
|
||||
PROJPATH = C:\U\GUY\P.DUE\CE\
|
||||
USEMFC = 1
|
||||
CC = cl
|
||||
CPP = cl
|
||||
@ -22,8 +22,8 @@ CPPUSEPCHFLAG = /YuSTDAFX.H
|
||||
FIRSTC =
|
||||
FIRSTCPP = STDAFX.CPP
|
||||
RC = rc
|
||||
CFLAGS_D_WEXE = /nologo /G2 /W3 /Zi /AL /Od /D "_DEBUG" /FR /GA /Fd"SESADUMP.PDB"
|
||||
CFLAGS_R_WEXE = /nologo /Gs /G2 /W3 /AL /O1 /D "NDEBUG" /FR /GA
|
||||
CFLAGS_D_WEXE = /nologo /G2 /W3 /Zi /AL /Od /D "_DEBUG" /I "\u\guy\p.due\cb5" /FR /GA /Fd"SESADUMP.PDB"
|
||||
CFLAGS_R_WEXE = /nologo /Gs /G2 /W3 /AL /O1 /D "NDEBUG" /I "\u\guy\p.due\cb5" /FR /GA
|
||||
LFLAGS_D_WEXE = /NOLOGO /NOD /NOE /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE /CO
|
||||
LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE
|
||||
LIBS_D_WEXE = lafxcwd oldnames libw llibcew commdlg.lib shell.lib
|
||||
@ -33,7 +33,7 @@ RESFLAGS = /nologo /t
|
||||
RUNFLAGS =
|
||||
DEFFILE = SESADUMP.DEF
|
||||
OBJS_EXT =
|
||||
LIBS_EXT = ..\..\..\MSVC\LIB\ODBC.LIB
|
||||
LIBS_EXT = ..\..\..\..\MSVC\LIB\ODBC.LIB
|
||||
!if "$(DEBUG)" == "1"
|
||||
CFLAGS = $(CFLAGS_D_WEXE)
|
||||
LFLAGS = $(LFLAGS_D_WEXE)
|
||||
@ -59,43 +59,51 @@ SBRS = STDAFX.SBR \
|
||||
SESADLG.SBR
|
||||
|
||||
|
||||
SESADUMP_RCDEP = c:\u\guy\sesadump\res\sesadump.ico \
|
||||
c:\u\guy\sesadump\res\sesadump.rc2
|
||||
SESADUMP_RCDEP = c:\u\guy\p.due\ce\sesadump.ico \
|
||||
c:\u\guy\p.due\ce\sesadump.rc2
|
||||
|
||||
|
||||
STDAFX_DEP = c:\u\guy\sesadump\stdafx.h
|
||||
STDAFX_DEP = c:\u\guy\p.due\ce\stdafx.h
|
||||
|
||||
|
||||
SESADUMP_DEP = c:\u\guy\sesadump\stdafx.h \
|
||||
c:\u\guy\sesadump\sesadump.h \
|
||||
c:\u\guy\sesadump\mainfrm.h \
|
||||
c:\u\guy\sesadump\sesaddoc.h \
|
||||
c:\u\guy\sesadump\sesadvw.h
|
||||
SESADUMP_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\sesadump.h \
|
||||
c:\u\guy\p.due\ce\mainfrm.h \
|
||||
c:\u\guy\p.due\ce\sesaddoc.h \
|
||||
c:\u\guy\p.due\ce\sesadvw.h \
|
||||
c:\u\guy\p.due\ce\sesa.h
|
||||
|
||||
|
||||
MAINFRM_DEP = c:\u\guy\sesadump\stdafx.h \
|
||||
c:\u\guy\sesadump\sesadump.h \
|
||||
c:\u\guy\sesadump\mainfrm.h
|
||||
MAINFRM_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\sesadump.h \
|
||||
c:\u\guy\p.due\ce\mainfrm.h \
|
||||
c:\u\guy\p.due\ce\sesadlg.h \
|
||||
c:\u\guy\p.due\ce\sesa.h
|
||||
|
||||
|
||||
SESADDOC_DEP = c:\u\guy\sesadump\stdafx.h \
|
||||
c:\u\guy\sesadump\sesadump.h \
|
||||
c:\u\guy\sesadump\sesaddoc.h
|
||||
SESADDOC_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\sesadump.h \
|
||||
c:\u\guy\p.due\ce\sesaddoc.h
|
||||
|
||||
|
||||
SESADVW_DEP = c:\u\guy\sesadump\stdafx.h \
|
||||
c:\u\guy\sesadump\sesadump.h \
|
||||
c:\u\guy\sesadump\sesaddoc.h \
|
||||
c:\u\guy\sesadump\sesadvw.h
|
||||
SESADVW_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\sesadump.h \
|
||||
c:\u\guy\p.due\ce\sesaddoc.h \
|
||||
c:\u\guy\p.due\ce\sesadvw.h
|
||||
|
||||
|
||||
SESA_DEP = c:\u\guy\sesadump\stdafx.h \
|
||||
c:\u\guy\sesadump\columnst.h \
|
||||
c:\u\guy\sesadump\sesa.h
|
||||
SESA_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\columnst.h \
|
||||
c:\u\guy\p.due\ce\sesa.h
|
||||
|
||||
|
||||
COLUMNST_DEP = c:\u\guy\sesadump\stdafx.h \
|
||||
c:\u\guy\sesadump\columnst.h
|
||||
COLUMNST_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\columnst.h
|
||||
|
||||
|
||||
SESADLG_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||
c:\u\guy\p.due\ce\sesadump.h \
|
||||
c:\u\guy\p.due\ce\sesadlg.h
|
||||
|
||||
|
||||
ODBC_DEP =
|
||||
@ -148,7 +156,7 @@ $(PROJ).EXE
|
||||
$(MAPFILE)
|
||||
c:\msvc\lib\+
|
||||
c:\msvc\mfc\lib\+
|
||||
..\..\..\MSVC\LIB\ODBC.LIB+
|
||||
..\..\..\..\MSVC\LIB\ODBC.LIB+
|
||||
$(LIBS)
|
||||
$(DEFFILE);
|
||||
<<
|
||||
|
Loading…
x
Reference in New Issue
Block a user