T* temp = 0; InterlockedEchangePointer(&s_value, &temp); T* value = temp; InterlockedEchangePointer(&s_value, &temp); if(!value) { acquireMutex... }