I should have played with it some more. Problem is although you can pass anything as a pointer to void, you cant use the void for anything(makes sense). So unless you want to change the declaration to void**, you can try the following
void * ThreadFunction (void *functionData)
{
functionData = calloc (strlen("Test")+1, sizeof(char));
strcpy((char*)functionData,"Test");
return functionData;
}
where the usage is
char* One
...
One=(char*)ThreadFunction(One);
...
free(One)//after use of the string is done.
You could take in
One and reallocate it as well by changing the calloc to realloc incase you are not sure whether the user has already allocated memory for this or not.
Hope this helps
Bilal
Bilal Durrani
NI