On Wednesday 28 May 2008 17:02:34 Michael Gogins wrote: > It doesn't work so well because ptw32_hand_t is treated by the Windows > pthread API as a value type, not a pointer. The idea would be to return the pointer to a ptw32_handle_t, ie: void* func(){ ptw32_handle_t* p = malloc(sizeof(ptw32_handle_t)); // use pthreads with *p return (void*)p; } And then free() it in the destroy functions. -- Felipe Sateler