S
Eigentlich nicht:
int PASCAL
WinMain(
HINSTANCE hinst,
HINSTANCE previnst,
LPSTR _cmdline,
int cmdshow
)
{
FARPROC proc;
char *p, buf[256];
unlink( CtlFileName());
unlink( sTmpFileName());
cmdline = _cmdline;
IsInitialiszed = FALSE;
SIsInitialiszed = FALSE;
StartOK = FALSE;
if ( previnst != NULL){
MakeKrach( "Daneben");
MsgBox( NULL,
"Programm bereits geladen\nEinmal reicht.",
PgmTitle, MB_ICONEXCLAMATION);
IdentifyMyWindow( hinst);
if ( hwndMine)
ShowWindow( hwndMine, SW_SHOW);
return FALSE;
}
GetModuleFileName( hinst, buf, 127);
if ( strlen( cmdline)){
sprintf( profile, cmdline);
} else {
if ( (p = strrchr( buf, '\\')) != NULL)
*p = 0;
sprintf( profile, "%s\\wdoc.ini", buf);
}
CreateJoesClasses( hinst);
proc = MakeProcInstance( SplashProc, hinst);
DialogBox( hinst, "SPLASH", NULL, proc);
FreeProcInstance( proc);
WritePrivateProfileString(
"Btrieve Requester", "Splash Screen", "N", BTIIniFileName());
if ( ! StartOK)
return FALSE;
proc = MakeProcInstance( MainProc, hinst);
DialogBox( hinst, "MAIN", NULL, proc);
FreeProcInstance( proc);
WriteProfileString( "JD DocuStock", "cmd", "BRK");
CloseAllDatabases();
FuckupJoesClasses( hinst);
ReleaseDialogFonts();
BTR_EndBtrieve();
return 0;
}