Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: Bille.dpr   Sprache: Delphi

program Bille;

//------------------------------------------------------------------------------
//
//Probleme/offene Punkte
//
//1. ftp-Zugang
//2. Upload
//3. XML-Parsing
//4. Webseite
//5. Lizenz festlegen
//...
//
//------------------------------------------------------------------------------
uses
  Forms,
  Windows,
  Dialogs,
  SysUtils,
  Messages,
  Mainboard in 'Mainboard.pas' {Mainboard},
  Options in 'Options.pas' {OptionDialog},
  Splash in 'Splash.pas' {SplashForm},
  language in 'language.pas',
  AboutBox in 'AboutBox.pas',
  Utilities in '..\..\Delphi Utilities\Utilities.pas',
  Matching in 'Matching.pas',
  Lizenz in 'Lizenz.pas' {Lizenzform},
  DBAccess in 'DBAccess.pas',
  mysql in '..\..\externer Code\MySQL.pas\mysql.pas',
  Search in 'Search.pas';

{$R *.res}
//------------------------------------------------------------------------------
//Uses
//------------------------------------------------------------------------------
var
  Mutex: THandle;
  OtherForm: THandle;
  ParamMessage: array [0 .. 240] of char;
  Opf:String;
  ct:integer;
  ISO:String;

  //------------------------------------------------------------------
  //-                                                                -
  //-  Interprocess Communication                                    -
  //-  (Receive in der Form)                                                              -
  //------------------------------------------------------------------
procedure SendString(receiverHandle: THandle; stringToSend: string);
var
  CopyDataStruct: TCopyDataStruct;
  res: integer;
  PC: PChar;
begin
  setl(ParamMessage, stringToSend);
  PC := @ParamMessage;
  CopyDataStruct.dwData := 0; //use it to identify the message contents
  CopyDataStruct.cbData := sizeof(ParamMessage);
  CopyDataStruct.lpData := PC;
  if receiverHandle <> 0 then begin
    res := SendMessage(receiverHandle, WM_COPYDATA, integer(Application.Handle),
      integer(@CopyDataStruct));
    if res <> 0 then
      errorn(0,'ipc :-(');
  end;
end;

//--------------------------------------
//Other Window Open?                                                                -
//--------------------------------------
procedure PreventSameProgramActive();
var
  fn: String;
begin
  OtherForm := FindWindow(PChar('TMainboard'), nil);
  Mutex := CreateMutex(nil, False, PChar('Bille'));
  if OtherForm <> 0 then begin
    fn := getCommandLineParameters();
    SendString(OtherForm, fn);
    ExitProcess(0);
  end
  else if (Mutex = 0) then begin
    ExitProcess(0)
  end
  else if (GetLastError = ERROR_ALREADY_EXISTS) then begin
    ExitProcess(0);
  end;
end;

//--------------------------------------
//-
//--------------------------------------
begin
  PreventDebuggerinRelease();
  PreventSameProgramActive();
  gettranslation();
  //---------------------------
  Opt := TOptions.create(nil);
  GlobalMemoryStatus(MS);
  InitialMemory := MS.dwAvailPhys;
  Application.Initialize;
  //
  Opt.InitOptions(PChar(optionsfilename(Title)));
  language.lang := Opt.r.language;
  ISO:='de';
  if language.lang<>german then
    ISO:='en';
  //free version
  SplashForm := TSplashForm.create(Application);
  with SplashForm do begin
    if fileexists(optionsfilename(Title)) then begin
      Label1.Caption := 'Willy Brandt';
      Label3.Caption := trans(8, 'Jetzt wächst zusammen, was zusammengehört.')
    end else begin
      Label1.Caption := '- Doing QA -';
      Label3.Caption := '*** please wait ***';
    end;
    Show;
    Update;
    sleep(1000);
  end;
  //
  Opf := OptionsFilename(Application.Title);
  with opt.R do begin
    ct := CheckInstallation(Opf, ObjectLen, ObjectSum, OptionsDlllen,
      OptionsDllsum, OptionsDllDate, WindowsProductId, Callcount);
    if ct > 0 then
      Triangletime := ct;
    //2,12,22 und 29,39,49
    ct := CheckFingerprint(Opf, ObjectLen, ObjectSum, ObjectDate, OptionsDlllen,
      OptionsDllsum, OptionsDllDate, Callcount);
    if ct > 0 then
      FingerTime := ct;
  end;
  //
  Application.Title := 'Bille';
  Application.HelpFile := ExtractFilePath(Application.ExeName) + 'Bille.'+ISO+'.chm';
  Application.HintHidePause:=3000;
  Application.HintPause:=200;
  //
  Application.CreateForm(TMainboard, Mainform);
  Mainform.Caption := Application.Title + ' ' + GetFileVersion(ParamStr(0));
  SplashForm.Close;
  Application.Run;
  Opt.r.WindowsProductId := GetWinProductId;
  Opt.putoptions(PChar(optionsfilename(Title)));
  // LibmySQL fault??
   ExitProcess(0);
end.
//--------------------------------------
//Ende dieser Quelle                                                              -
//--------------------------------------

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ¤





Download des
Quellennavigators
Download des
sprechenden Kalenders

in der Quellcodebibliothek suchen




Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.


Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.


Bot Zugriff



                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik