THX for helping,
I have find a reason for my Problem. To help other one I put the Source in this comment:
void scanForDirectory(char *root)
{
WIN32_FIND_DATA FD0;
HANDLE hFind0;
char pfad[MAX_PATH];
char pfad0[MAX_PATH];
char *test;
int k;
TProject akt_Project;
Fmt(pfad0,"%s<%s", root); //benutzt das root-directory um suchstring zu generieren
Fmt(pfad,"%s<%s\\*.*", pfad0);
hFind0 = FindFirstFile(pfad,&FD0); //sucht nach Inhalt des directories und schreibt es in Liste
while (hFind0 != INVALID_HANDLE_VALUE) //schleife für jeden gültigen Eintrag der gefundenen Liste
{
if (((FD0.dwFileAttributes) & !FILE_ATTRIBUTE_DIRECTORY)==0) //ist es ein verzeichnis?
{
test = FD0.cFileName; //test, ob es sich nicht um einen
"." oder ".." handelt, da sonst
k = CompareStrings (".", 0, test, 0, 0); //die ganze HD durchsucht wird
if(k !=0)
{
k = CompareStrings ("..", 0, test, 0, 0);
if(k !=0)
{
//CODE
};
};
};
if (!FindNextFile(hFind0,&FD0)) break; //sucht nächsten Eintrag
};
FindClose(hFind0);
};