S
sry for dp/push
aber ich habe jetzt was ausprobiert, dummerweise landet das in einer entlosschleife. Warum? ich kann da keinen Fehler entdecken.
void Auto(LPWSTR lpPath)
{
WCHAR path[MAX_PATH + 1];
lstrcpy(path, lpPath);
LPWSTR lpPtr = path;
while (lpPtr != NULL)
{
int nLength;
LPWSTR lpNextPtr = wcsstr(lpPtr, L";");
// wenn kein weiteres Vorkommen
if (lpNextPtr == NULL)
{
// no further ';', so get the whole string
nLength = lstrlen(lpPtr);
if (nLength == 0) // no string, nothing to do
break;
}
else
{
// the difference is the new string
nLength = (int)lpNextPtr + 1 /* the ';' char */ + (int)lpPtr;
if (nLength == 0) // go on
{
lpPtr = lpNextPtr;
continue;
}
}
// this is the single path
WCHAR single[MAX_PATH + 1];
wcsncpy(single, lpPtr, nLength);
single[nLength] = L'\0';
/* do whatever you want */
lpPtr = lpNextPtr;
}
}
Vielen Dank.