07 2017 档案
摘要:// Event.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include DWORD WINAPI ThreadProc1(LPVOID lpThreadParameter); DWORD WINAPI ThreadProc2(LPVOID l...
阅读全文
摘要:// Mutex.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include //Mutex的OpenMutex()与ReleaseMutex()必须线程配对的.不配对线程的操作会报错(Attempt Release Mutex not owner...
阅读全文
摘要:1 // CriticalSection.cpp : Defines the entry point for the console application. 2 // 3 4 #include "stdafx.h" 5 #include 6 7 8 // CriticalSection的InitializeCriticalSection(),DeleteCritical...
阅读全文
摘要:// AtomicOperation.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include //所谓原子操作是指不会被线程调度机制打断的操作;这种操作一旦开始,就一直运行到结束,中间不会有任何 context switch (切换到另一个线程)。 LONG g_...
阅读全文
摘要:进程是否有该进程的内核对象引用次数,关闭时能否减去正确的引用记数. 线程↑↑↑↑↑↑↑↑↑↑↑↑↑ 线程是否有进程句柄表索引的索引表? 内核对象在线程退出时,在进程退出时,会怎么样? 在没有线程拥有该内核对象会怎么样? 在没有进程拥有该内核对象会怎么样? CreateMutex()时,返回句柄.这时
阅读全文
摘要:GetLastError() 的全部机制 有的函数内部保证调用 SetLastError() ,所以在这样的函数后面GetLastError()一般绝对没有问题.
阅读全文
浙公网安备 33010602011771号