在我的代码中,我使用QueueUserAPC从他当前的工作中中断主线程,以便在返回他之前的工作之前先调用一些回调。std::stringbuffer;std::tr1::shared_ptrhMainThread;VOIDCALLBACKmyCallback(ULONG_PTRdwParam){FILE*f=fopen("somefile","a");fprintf(f,"CALLBACKWASINVOKED!\n");fclose(f);}voidAdditionalThread(){//downloadsomefileusingsynchronouswininetandstoret