OverlappedCall* OverlappedCall::GetActiveProcessOverlappedCall() { // We no longer have a pool (for simplicity), so just answer a new thread every time. // The thread will be retained for use for all subseqeunt overlapped calls from the // associated process. // The new OverlappedCall will have an initial reference of one from its // own thread. At the moment we have no ref. count on it. Process* pActiveProcess = Interpreter::actualActiveProcess(); OverlappedCall* pOverlapped = pActiveProcess->GetOverlappedCall(); if (pOverlapped == NULL) { ProcessOTE* oteProcess = Interpreter::actualActiveProcessPointer(); pOverlapped = OverlappedCall::New(oteProcess); pActiveProcess->SetThread(pOverlapped); pActiveProcess->NewOverlapSemaphore(); } return pOverlapped; }