Re: Directory is a "a file system object" ?



thanks.

but now I have a strange problem constructing pFrom buffer

the format is: Each file name must be terminated by a single NULL character.
An additional NULL character must be appended to the end of the final name
to indicate the end of pFrom

my code works only if the "single NULL separator", is any other char then \0
!!!!!!!

i have no ideea what is wrong ...

i'll post some code, maybe someone can help ...

text_to_add - text to be added
text_to_add_len - strlen(text_to_add)
szBuff - output string

if (szBuff!=NULL) {
iSize = iSize+text_to_add_len+1;
szBuff = (TCHAR*)realloc(szBuff,iSize*sizeof(TCHAR));
wsprintf(szBuff,TEXT("%s\0%s"),szBuff,text_to_add); // if I replace here \0
with # , the szBuff is fine
//strcat(szBuff,text_to_add);
//strcat(szBuff,TEXT("\0"));
}
else {
iSize = text_to_add_len+1;
szBuff = (TCHAR*)malloc(iSize*sizeof(TCHAR));
strcpy(szBuff,text_to_add);
//strcat(szBuff,TEXT("\0"));
}

any idea ?


.