Don't allocate memory for the thread error structure until it is needed, as it is quite large and wastes memory for threads that don't call any wininet function.