<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Probleme mit CopyFile unter Borland Builder 6]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe hier ein kleines Programm geschrieben, das ein Verzeichnis nach veränderten Dateien durchsucht und diese dann in ein anderes Verzeichnis kopiert.<br />
Das Programm funktioniert auch so weit ganz gut, leider stürzt es immer ab, wenn die zu kopierende Datenmenge größer als ca. 500 MB beträgt.<br />
Ich gehe mal davon aus, dass das mit der Routine CopyFile zusammenhängt, kann aber auch sein, dass ich irgendwo vergessen habe, Speicher wieder frei zu machen???<br />
Bin noch nicht so versiert in der Programmierung - speziell C++, daher ist das Programm auch nicht so sauber geschrieben - ich bitte dies zu verzeihen.<br />
Man könnte sicherlich noch einiges zusammenfassen usw. und die Portabilität ist hier sicherlich auch nicht gegeben, aber das sehe ich ersteinmal zweitrangig.</p>
<p>So hier der Quelltext:<br />
Wäre super, wenn mir einer von euch weiterhelfen könnte!</p>
<pre><code>#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
#include &quot;Unit2.h&quot;
#include &quot;Unit3.h&quot;
#include &quot;Unit4.h&quot;
//#include &lt;sys\stat.h&gt;
#include &lt;time.h&gt;
#include &lt;dir.h&gt;
#include &lt;Filectrl.hpp&gt;
//#include &lt;winnt.h&gt;
//#include &lt;io.h&gt;
#include &lt;stdio.h&gt;
#include &lt;IniFiles.hpp&gt;
//#include &lt;system.hpp&gt;

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
Tmain_form *main_form;
int countfile = 0;
int success = 0;
//---------------------------------------------------------------------------
__fastcall Tmain_form::Tmain_form(TComponent* Owner)
        : TForm(Owner)
{
         AnsiString install_pfad = GetCurrentDir();
         //main_form-&gt;Edit1-&gt;Text = install_pfad+&quot;//conf.ini&quot;;

  if (FileExists(install_pfad+&quot;//conf.ini&quot;))
  {
      main_form-&gt;Edit2-&gt;Text = &quot;ja&quot;;
  }
  else
      {
       main_form-&gt;Edit2-&gt;Text = &quot;nein&quot;;
      }

}
//---------------------------------------------------------------------------
void __fastcall Tmain_form::main_menue_beendenClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void SearchSubdirsProgress(const AnsiString Pfad, const AnsiString verz, const AnsiString Mask)
{
WIN32_FIND_DATA FindFileData;
char FileName[MAX_PATH];
strcpy(FileName,(Pfad+Mask).c_str());
HANDLE h=FindFirstFile(
FileName, // Zeiger auf den Dateinamen
&amp;FindFileData); // Zeiger auf struct
if (h!=INVALID_HANDLE_VALUE)
 {
  int found=1;
  while (found)
  {
   //verz = (Pfad.Delete(1,3)).c_str();
   //verz = verz.Insert(&quot;d:\\&quot;,1).c_str();
   if ((FindFileData.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY)!=0)
      { // Unterverzeichnis
      if (strcmp(FindFileData.cFileName,&quot;.&quot;)==0); // &quot;.&quot; ignorieren
      else if (strcmp(FindFileData.cFileName,&quot;..&quot;)==0); // &quot;..&quot; ignorieren
      else // Verzeichnis, rekursiv durchsuchen
         {
           if (!DirectoryExists(verz+FindFileData.cFileName))
             { 
	       CreateDir(verz+FindFileData.cFileName);
	     }
           SearchSubdirsProgress(Pfad+FindFileData.cFileName+&quot;\\&quot;,verz+FindFileData.cFileName+&quot;\\&quot;,Mask);
         }
      }
   else
      {
        TSearchRec SearchRecHilf;
        if (!FileExists(verz+FindFileData.cFileName))
          {
            countfile++;
          }
        else
          {
            AnsiString file = verz+FindFileData.cFileName;
            FindFirst(file, faAnyFile, SearchRecHilf);
            if (FindFileData.ftLastWriteTime.dwLowDateTime &gt; SearchRecHilf.FindData.ftLastWriteTime.dwLowDateTime)
               {
                countfile++;
               }
          }
        FindClose(SearchRecHilf);
      }
   found=FindNextFile(h,&amp;FindFileData);
  }
  FindClose(h);
 }
};
//---------------------------------------------------------------------------
void SearchSubdirs(const AnsiString Pfad, const AnsiString verz, const AnsiString Mask)
{
WIN32_FIND_DATA FindFileData;
char FileName[MAX_PATH];
strcpy(FileName,(Pfad+Mask).c_str());
HANDLE h=FindFirstFile(
FileName, // Zeiger auf den Dateinamen
&amp;FindFileData); // Zeiger auf struct
if (h!=INVALID_HANDLE_VALUE)
  {
    int found=1;
    while (found)
        {
          free(FileName); // nachträglich hinzugefügt
          //verz = (Pfad.Delete(1,3)).c_str();
          //verz = verz.Insert(&quot;d:\\&quot;,1).c_str();
          if ((FindFileData.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY)!=0)
             { // Unterverzeichnis
               if (strcmp(FindFileData.cFileName,&quot;.&quot;)==0); // &quot;.&quot; ignorieren
               else if (strcmp(FindFileData.cFileName,&quot;..&quot;)==0); // &quot;..&quot; ignorieren
               else // Verzeichnis, rekursiv durchsuchen
                   {
                     if (!DirectoryExists(verz+FindFileData.cFileName))
                        {
                          CreateDir(verz+FindFileData.cFileName);
                        }
                     SearchSubdirs(Pfad+FindFileData.cFileName+&quot;\\&quot;,verz+FindFileData.cFileName+&quot;\\&quot;,Mask);
                   }
             }
          else
             {
               TSearchRec SearchRecHilf;
               if (!FileExists(verz+FindFileData.cFileName))
                  {
                    CopyFile((Pfad+FindFileData.cFileName).c_str(),(verz+FindFileData.cFileName).c_str(),true);
                    list_form-&gt;memo_liste-&gt;Lines-&gt;Add((Pfad+FindFileData.cFileName).c_str());
                    main_form-&gt;pgb_fortschritt-&gt;StepBy(1);
                  }
               else
                  {
                    AnsiString file = verz+FindFileData.cFileName;
                    FindFirst(file, faAnyFile, SearchRecHilf);
                    if (FindFileData.ftLastWriteTime.dwLowDateTime &gt; SearchRecHilf.FindData.ftLastWriteTime.dwLowDateTime)
                       {
                         DeleteFile((verz+SearchRecHilf.Name).c_str());
                         CopyFile((Pfad+FindFileData.cFileName).c_str(),(verz+FindFileData.cFileName).c_str(),true);
                         list_form-&gt;memo_liste-&gt;Lines-&gt;Add((Pfad+FindFileData.cFileName).c_str());
                         main_form-&gt;pgb_fortschritt-&gt;StepBy(1);
                       }
                  }
               FindClose(SearchRecHilf);
             }
          found=FindNextFile(h,&amp;FindFileData);
        }
    FindClose(h);
  }
};
//---------------------------------------------------------------------------
void checkdata (const AnsiString maske, const AnsiString pfad_verzeichnis, const AnsiString verz_ziel, int outlback)
{
         if (main_form-&gt;Edit2-&gt;Text == &quot;nein&quot;)
            {
             Application-&gt;MessageBox(&quot;Konfigurationsdatei ist noch nicht vorhanden - bitte erstellen&quot;,&quot;Fehler&quot; , MB_OK);
             options_form-&gt;ShowModal();
             main_form-&gt;Edit2-&gt;Text = &quot;ja&quot;;

            }
         else
            {
             if (outlback == 0)
             {
              //const AnsiString pfad_verzeichnis = options_form-&gt;ed_datei_quell_pfad-&gt;Text.c_str();
              SearchSubdirsProgress(pfad_verzeichnis,verz_ziel, maske);
              main_form-&gt;pgb_fortschritt-&gt;Max = countfile;
              //main_form-&gt;Edit1-&gt;Text = countfile;
              SearchSubdirs(pfad_verzeichnis,verz_ziel, maske);
             }
             else
             {
              SearchSubdirsProgress(pfad_verzeichnis,verz_ziel, maske);
              main_form-&gt;pgb_fortschritt-&gt;Max = countfile;
              //main_form-&gt;Edit1-&gt;Text = (countfile/2);
              SearchSubdirs(pfad_verzeichnis,verz_ziel, maske);
             }
            }
}

//---------------------------------------------------------------------------

void __fastcall Tmain_form::bt_sichernClick(TObject *Sender)
{

 if (cb_dateien-&gt;Checked &amp;&amp; cb_outlook-&gt;Checked)
       {
         const AnsiString outl = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0];
         const AnsiString v_ziel = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2];
         const AnsiString v_quell = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1];
         if (!DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0]) &amp;&amp; !DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1]))
              {
               Application-&gt;MessageBox(&quot;Verzeichnisse sind nicht vorhanden - bitte konfigurieren&quot;,&quot;Fehler&quot; , MB_OK);
              }
         else
              {
               checkdata(&quot;*&quot;, outl, v_ziel, 1);
               checkdata(&quot;*&quot;, v_quell, v_ziel, 1);
              }
       }
 else
       {
        if (cb_outlook-&gt;Checked)
        {
         const AnsiString outl = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0];
         const AnsiString v_ziel = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2];
         if (!DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0]) &amp;&amp; !DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2]))
              {
               Application-&gt;MessageBox(&quot;Verzeichnisse sind nicht vorhanden - bitte konfigurieren&quot;,&quot;Fehler&quot; , MB_OK);
              }
         else
              {
               checkdata(&quot;*&quot;, outl, v_ziel, 0);
              }
        }
        else
         {
          if (cb_dateien-&gt;Checked)
          {
            const AnsiString v_quell = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1];
            const AnsiString v_ziel = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2];
            if (!DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1]) &amp;&amp; !DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2]))
              {
               Application-&gt;MessageBox(&quot;Verzeichnisse sind nicht vorhanden - bitte konfigurieren&quot;,&quot;Fehler&quot; , MB_OK);
              }
            else
              {
               checkdata(&quot;*&quot;, v_quell, v_ziel, 0);
              }
          }
          else
          {
            Application-&gt;MessageBox(&quot;Bitte machen Sie erst eine Auswahl&quot;,&quot;Fehler&quot; , MB_OK);
          }
         }
       }
if (success &gt; 0 || countfile &gt; 0)
{
Application-&gt;MessageBox(&quot;Sicherung erfolgreich&quot;,&quot;Juhu&quot; , MB_OK);
countfile = 0;
}
else
{Application-&gt;MessageBox(&quot;Nichts gesichert&quot;,&quot;Sorry&quot; , MB_OK);}
}
//---------------------------------------------------------------------------

void __fastcall Tmain_form::bt_listeClick(TObject *Sender)
{
list_form-&gt;ShowModal();
}
//---------------------------------------------------------------------------

void __fastcall Tmain_form::main_menue_infoClick(TObject *Sender)
{
  AboutBox-&gt;ShowModal();      
}
//---------------------------------------------------------------------------

void __fastcall Tmain_form::main_menu_allgemeinClick(TObject *Sender)
{
  options_form-&gt;ShowModal();
}
//---------------------------------------------------------------------------
</code></pre>
<p>PS: bin bisher immer mit der suchen-Funktion weiter gekommen, aber jetzt wusste ich einfach nicht mehr weiter!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124180/probleme-mit-copyfile-unter-borland-builder-6</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Jul 2026 18:22:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124180.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Oct 2005 15:49:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Mon, 24 Oct 2005 16:46:10 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe hier ein kleines Programm geschrieben, das ein Verzeichnis nach veränderten Dateien durchsucht und diese dann in ein anderes Verzeichnis kopiert.<br />
Das Programm funktioniert auch so weit ganz gut, leider stürzt es immer ab, wenn die zu kopierende Datenmenge größer als ca. 500 MB beträgt.<br />
Ich gehe mal davon aus, dass das mit der Routine CopyFile zusammenhängt, kann aber auch sein, dass ich irgendwo vergessen habe, Speicher wieder frei zu machen???<br />
Bin noch nicht so versiert in der Programmierung - speziell C++, daher ist das Programm auch nicht so sauber geschrieben - ich bitte dies zu verzeihen.<br />
Man könnte sicherlich noch einiges zusammenfassen usw. und die Portabilität ist hier sicherlich auch nicht gegeben, aber das sehe ich ersteinmal zweitrangig.</p>
<p>So hier der Quelltext:<br />
Wäre super, wenn mir einer von euch weiterhelfen könnte!</p>
<pre><code>#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
#include &quot;Unit2.h&quot;
#include &quot;Unit3.h&quot;
#include &quot;Unit4.h&quot;
//#include &lt;sys\stat.h&gt;
#include &lt;time.h&gt;
#include &lt;dir.h&gt;
#include &lt;Filectrl.hpp&gt;
//#include &lt;winnt.h&gt;
//#include &lt;io.h&gt;
#include &lt;stdio.h&gt;
#include &lt;IniFiles.hpp&gt;
//#include &lt;system.hpp&gt;

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
Tmain_form *main_form;
int countfile = 0;
int success = 0;
//---------------------------------------------------------------------------
__fastcall Tmain_form::Tmain_form(TComponent* Owner)
        : TForm(Owner)
{
         AnsiString install_pfad = GetCurrentDir();
         //main_form-&gt;Edit1-&gt;Text = install_pfad+&quot;//conf.ini&quot;;

  if (FileExists(install_pfad+&quot;//conf.ini&quot;))
  {
      main_form-&gt;Edit2-&gt;Text = &quot;ja&quot;;
  }
  else
      {
       main_form-&gt;Edit2-&gt;Text = &quot;nein&quot;;
      }

}
//---------------------------------------------------------------------------
void __fastcall Tmain_form::main_menue_beendenClick(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void SearchSubdirsProgress(const AnsiString Pfad, const AnsiString verz, const AnsiString Mask)
{
WIN32_FIND_DATA FindFileData;
char FileName[MAX_PATH];
strcpy(FileName,(Pfad+Mask).c_str());
HANDLE h=FindFirstFile(
FileName, // Zeiger auf den Dateinamen
&amp;FindFileData); // Zeiger auf struct
if (h!=INVALID_HANDLE_VALUE)
 {
  int found=1;
  while (found)
  {
   //verz = (Pfad.Delete(1,3)).c_str();
   //verz = verz.Insert(&quot;d:\\&quot;,1).c_str();
   if ((FindFileData.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY)!=0)
      { // Unterverzeichnis
      if (strcmp(FindFileData.cFileName,&quot;.&quot;)==0); // &quot;.&quot; ignorieren
      else if (strcmp(FindFileData.cFileName,&quot;..&quot;)==0); // &quot;..&quot; ignorieren
      else // Verzeichnis, rekursiv durchsuchen
         {
           if (!DirectoryExists(verz+FindFileData.cFileName))
             { 
	       CreateDir(verz+FindFileData.cFileName);
	     }
           SearchSubdirsProgress(Pfad+FindFileData.cFileName+&quot;\\&quot;,verz+FindFileData.cFileName+&quot;\\&quot;,Mask);
         }
      }
   else
      {
        TSearchRec SearchRecHilf;
        if (!FileExists(verz+FindFileData.cFileName))
          {
            countfile++;
          }
        else
          {
            AnsiString file = verz+FindFileData.cFileName;
            FindFirst(file, faAnyFile, SearchRecHilf);
            if (FindFileData.ftLastWriteTime.dwLowDateTime &gt; SearchRecHilf.FindData.ftLastWriteTime.dwLowDateTime)
               {
                countfile++;
               }
          }
        FindClose(SearchRecHilf);
      }
   found=FindNextFile(h,&amp;FindFileData);
  }
  FindClose(h);
 }
};
//---------------------------------------------------------------------------
void SearchSubdirs(const AnsiString Pfad, const AnsiString verz, const AnsiString Mask)
{
WIN32_FIND_DATA FindFileData;
char FileName[MAX_PATH];
strcpy(FileName,(Pfad+Mask).c_str());
HANDLE h=FindFirstFile(
FileName, // Zeiger auf den Dateinamen
&amp;FindFileData); // Zeiger auf struct
if (h!=INVALID_HANDLE_VALUE)
  {
    int found=1;
    while (found)
        {
          free(FileName); // nachträglich hinzugefügt
          //verz = (Pfad.Delete(1,3)).c_str();
          //verz = verz.Insert(&quot;d:\\&quot;,1).c_str();
          if ((FindFileData.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY)!=0)
             { // Unterverzeichnis
               if (strcmp(FindFileData.cFileName,&quot;.&quot;)==0); // &quot;.&quot; ignorieren
               else if (strcmp(FindFileData.cFileName,&quot;..&quot;)==0); // &quot;..&quot; ignorieren
               else // Verzeichnis, rekursiv durchsuchen
                   {
                     if (!DirectoryExists(verz+FindFileData.cFileName))
                        {
                          CreateDir(verz+FindFileData.cFileName);
                        }
                     SearchSubdirs(Pfad+FindFileData.cFileName+&quot;\\&quot;,verz+FindFileData.cFileName+&quot;\\&quot;,Mask);
                   }
             }
          else
             {
               TSearchRec SearchRecHilf;
               if (!FileExists(verz+FindFileData.cFileName))
                  {
                    CopyFile((Pfad+FindFileData.cFileName).c_str(),(verz+FindFileData.cFileName).c_str(),true);
                    list_form-&gt;memo_liste-&gt;Lines-&gt;Add((Pfad+FindFileData.cFileName).c_str());
                    main_form-&gt;pgb_fortschritt-&gt;StepBy(1);
                  }
               else
                  {
                    AnsiString file = verz+FindFileData.cFileName;
                    FindFirst(file, faAnyFile, SearchRecHilf);
                    if (FindFileData.ftLastWriteTime.dwLowDateTime &gt; SearchRecHilf.FindData.ftLastWriteTime.dwLowDateTime)
                       {
                         DeleteFile((verz+SearchRecHilf.Name).c_str());
                         CopyFile((Pfad+FindFileData.cFileName).c_str(),(verz+FindFileData.cFileName).c_str(),true);
                         list_form-&gt;memo_liste-&gt;Lines-&gt;Add((Pfad+FindFileData.cFileName).c_str());
                         main_form-&gt;pgb_fortschritt-&gt;StepBy(1);
                       }
                  }
               FindClose(SearchRecHilf);
             }
          found=FindNextFile(h,&amp;FindFileData);
        }
    FindClose(h);
  }
};
//---------------------------------------------------------------------------
void checkdata (const AnsiString maske, const AnsiString pfad_verzeichnis, const AnsiString verz_ziel, int outlback)
{
         if (main_form-&gt;Edit2-&gt;Text == &quot;nein&quot;)
            {
             Application-&gt;MessageBox(&quot;Konfigurationsdatei ist noch nicht vorhanden - bitte erstellen&quot;,&quot;Fehler&quot; , MB_OK);
             options_form-&gt;ShowModal();
             main_form-&gt;Edit2-&gt;Text = &quot;ja&quot;;

            }
         else
            {
             if (outlback == 0)
             {
              //const AnsiString pfad_verzeichnis = options_form-&gt;ed_datei_quell_pfad-&gt;Text.c_str();
              SearchSubdirsProgress(pfad_verzeichnis,verz_ziel, maske);
              main_form-&gt;pgb_fortschritt-&gt;Max = countfile;
              //main_form-&gt;Edit1-&gt;Text = countfile;
              SearchSubdirs(pfad_verzeichnis,verz_ziel, maske);
             }
             else
             {
              SearchSubdirsProgress(pfad_verzeichnis,verz_ziel, maske);
              main_form-&gt;pgb_fortschritt-&gt;Max = countfile;
              //main_form-&gt;Edit1-&gt;Text = (countfile/2);
              SearchSubdirs(pfad_verzeichnis,verz_ziel, maske);
             }
            }
}

//---------------------------------------------------------------------------

void __fastcall Tmain_form::bt_sichernClick(TObject *Sender)
{

 if (cb_dateien-&gt;Checked &amp;&amp; cb_outlook-&gt;Checked)
       {
         const AnsiString outl = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0];
         const AnsiString v_ziel = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2];
         const AnsiString v_quell = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1];
         if (!DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0]) &amp;&amp; !DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1]))
              {
               Application-&gt;MessageBox(&quot;Verzeichnisse sind nicht vorhanden - bitte konfigurieren&quot;,&quot;Fehler&quot; , MB_OK);
              }
         else
              {
               checkdata(&quot;*&quot;, outl, v_ziel, 1);
               checkdata(&quot;*&quot;, v_quell, v_ziel, 1);
              }
       }
 else
       {
        if (cb_outlook-&gt;Checked)
        {
         const AnsiString outl = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0];
         const AnsiString v_ziel = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2];
         if (!DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[0]) &amp;&amp; !DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2]))
              {
               Application-&gt;MessageBox(&quot;Verzeichnisse sind nicht vorhanden - bitte konfigurieren&quot;,&quot;Fehler&quot; , MB_OK);
              }
         else
              {
               checkdata(&quot;*&quot;, outl, v_ziel, 0);
              }
        }
        else
         {
          if (cb_dateien-&gt;Checked)
          {
            const AnsiString v_quell = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1];
            const AnsiString v_ziel = options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2];
            if (!DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[1]) &amp;&amp; !DirectoryExists(options_form-&gt;memo_config-&gt;Lines-&gt;Strings[2]))
              {
               Application-&gt;MessageBox(&quot;Verzeichnisse sind nicht vorhanden - bitte konfigurieren&quot;,&quot;Fehler&quot; , MB_OK);
              }
            else
              {
               checkdata(&quot;*&quot;, v_quell, v_ziel, 0);
              }
          }
          else
          {
            Application-&gt;MessageBox(&quot;Bitte machen Sie erst eine Auswahl&quot;,&quot;Fehler&quot; , MB_OK);
          }
         }
       }
if (success &gt; 0 || countfile &gt; 0)
{
Application-&gt;MessageBox(&quot;Sicherung erfolgreich&quot;,&quot;Juhu&quot; , MB_OK);
countfile = 0;
}
else
{Application-&gt;MessageBox(&quot;Nichts gesichert&quot;,&quot;Sorry&quot; , MB_OK);}
}
//---------------------------------------------------------------------------

void __fastcall Tmain_form::bt_listeClick(TObject *Sender)
{
list_form-&gt;ShowModal();
}
//---------------------------------------------------------------------------

void __fastcall Tmain_form::main_menue_infoClick(TObject *Sender)
{
  AboutBox-&gt;ShowModal();      
}
//---------------------------------------------------------------------------

void __fastcall Tmain_form::main_menu_allgemeinClick(TObject *Sender)
{
  options_form-&gt;ShowModal();
}
//---------------------------------------------------------------------------
</code></pre>
<p>PS: bin bisher immer mit der suchen-Funktion weiter gekommen, aber jetzt wusste ich einfach nicht mehr weiter!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900164</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Mon, 24 Oct 2005 16:46:10 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Mon, 24 Oct 2005 16:07:20 GMT]]></title><description><![CDATA[<p>Wenn du das mal vernünftig einrückst, schaut es sich vielleicht auch jemand an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900179</guid><dc:creator><![CDATA[Ringding]]></dc:creator><pubDate>Mon, 24 Oct 2005 16:07:20 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Mon, 24 Oct 2005 16:49:18 GMT]]></title><description><![CDATA[<p>Hast ja recht.<br />
Eigentlich sollte man das ja auch von Anfang an machen!!</p>
<p>Ich hoffe jetzt ist es besser?!?!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900215</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Mon, 24 Oct 2005 16:49:18 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Mon, 24 Oct 2005 19:22:02 GMT]]></title><description><![CDATA[<p>char FileName[MAX_PATH];<br />
strcpy(FileName,(Pfad+Mask).c_str());<br />
.<br />
.<br />
.<br />
free(FileName); // nachträglich hinzugefügt</p>
<p>Was soll das ???<br />
Du gibst NICHT dynamisch belegten Speicher frei?</p>
<p>Sollte doch nen Fehler verursachen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900352</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Mon, 24 Oct 2005 19:22:02 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Tue, 25 Oct 2005 03:45:57 GMT]]></title><description><![CDATA[<p>free(Filename);<br />
habe ich nachträglich hinzugefügt. Ohne stürzt das Programm auch ab.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900499</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Tue, 25 Oct 2005 03:45:57 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Tue, 25 Oct 2005 06:30:21 GMT]]></title><description><![CDATA[<p>An welcher Stelle, mit welcher Fehlermeldung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900553</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900553</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Tue, 25 Oct 2005 06:30:21 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Tue, 25 Oct 2005 18:30:45 GMT]]></title><description><![CDATA[<p>Na ja, es ist kein Absturz im eigentlichen Sinne. Das Programm läuft zwar weiter und erledigt den Job auch. Jedoch wird im Taskmanager der Status &quot;Keine Rückmeldung&quot; angezeigt, und ich kann das Programm nur abschießen.<br />
Vielleicht habe ich das oben ein wenig falsch formuliert. Der Debugger zeigt keine Fehlermeldung an und das Programm läuft weiter.<br />
Mich stört nur, dass das Programm während der Such- und Kopierphase nicht reagiert.<br />
Das ist auch der Grund warum ich nicht wirklich weiter komme. Habe auch schon versucht an der Debugger-Optionen ein wenig zu schrauben bzw. mir die Threads und alles andere, was man sich unter &quot;Ansicht&quot; anzeigen lassen kann, angesehen.<br />
Doch leider werde ich daraus nicht wirklich schlau.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900621</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900621</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Tue, 25 Oct 2005 18:30:45 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Tue, 25 Oct 2005 18:39:31 GMT]]></title><description><![CDATA[<p>Pack ein <em>Application-&gt;ProcessMessages();</em> in die Schleifen.<br />
Wenn das nicht reicht, z.B. wegen einzelner sehr grosser Dateien, dann musst du die Kopiererei in eigene Threads auslagern (siehe z.B. TThread).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900626</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Tue, 25 Oct 2005 18:39:31 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Tue, 25 Oct 2005 18:44:14 GMT]]></title><description><![CDATA[<p>Vielen Dank, werde das mal versuchen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900629</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Tue, 25 Oct 2005 18:44:14 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Tue, 25 Oct 2005 18:55:04 GMT]]></title><description><![CDATA[<p>Application-&gt;ProcessMessages();<br />
brachte eigentlich schon den gewünschten erfolg.<br />
Werde aber auch mal das mit den Threds ausprobieren.</p>
<p>Ach und danke für die schnelle Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900634</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Tue, 25 Oct 2005 18:55:04 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit CopyFile unter Borland Builder 6 on Wed, 26 Oct 2005 06:57:01 GMT]]></title><description><![CDATA[<p>tha_dude schrieb:</p>
<blockquote>
<p>Na ja, es ist kein Absturz im eigentlichen Sinne. Das Programm läuft zwar weiter und erledigt den Job auch. Jedoch wird im Taskmanager der Status &quot;Keine Rückmeldung&quot; angezeigt, und ich kann das Programm nur abschießen.</p>
</blockquote>
<p>Der Task-Manager kann auch nicht wirklich überprüfen, ob ein Programm noch arbeitet - der schickt nur regelmäßig Messages ala &quot;bist du noch da?&quot; und setzt die Anzeige auf inaktiv, wenn das Programm nicht antwortet. (und da du in deiner Schleife die Nachrichten nicht abfragst, reagiert das Programm inzwischen nicht auf diese Anfragen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900857</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 26 Oct 2005 06:57:01 GMT</pubDate></item></channel></rss>