摘要: 1 #include <windows.h> 2 #include <stdio.h> 3 4 5 int g_i = 0; 6 7 LONG NTAPI VEHCallback(EXCEPTION_POINTERS* p) 8 { 9 p->ContextRecord->Eax = (DWORD) 阅读全文
posted @ 2017-08-08 18:54 Spobt 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1 #pragma once 2 #include <windows.h> 3 #include <tchar.h> 4 5 6 int HookIAT_MessageBoxW(char* strDllName, char* strFunNameOrOdinal, _Out_ DWORD& dwOl 阅读全文
posted @ 2017-08-05 17:43 Spobt 阅读(133) 评论(0) 推荐(0) 编辑
摘要: // 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... 阅读全文
posted @ 2017-07-20 16:39 Spobt 阅读(125) 评论(0) 推荐(0) 编辑
摘要: // Mutex.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include //Mutex的OpenMutex()与ReleaseMutex()必须线程配对的.不配对线程的操作会报错(Attempt Release Mutex not owner... 阅读全文
posted @ 2017-07-20 16:38 Spobt 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2017-07-20 16:35 Spobt 阅读(140) 评论(0) 推荐(0) 编辑
摘要: // AtomicOperation.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include //所谓原子操作是指不会被线程调度机制打断的操作;这种操作一旦开始,就一直运行到结束,中间不会有任何 context switch (切换到另一个线程)。 LONG g_... 阅读全文
posted @ 2017-07-20 16:34 Spobt 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 进程是否有该进程的内核对象引用次数,关闭时能否减去正确的引用记数. 线程↑↑↑↑↑↑↑↑↑↑↑↑↑ 线程是否有进程句柄表索引的索引表? 内核对象在线程退出时,在进程退出时,会怎么样? 在没有线程拥有该内核对象会怎么样? 在没有进程拥有该内核对象会怎么样? CreateMutex()时,返回句柄.这时 阅读全文
posted @ 2017-07-18 20:58 Spobt 阅读(298) 评论(0) 推荐(0) 编辑
摘要: GetLastError() 的全部机制 有的函数内部保证调用 SetLastError() ,所以在这样的函数后面GetLastError()一般绝对没有问题. 阅读全文
posted @ 2017-07-18 20:31 Spobt 阅读(247) 评论(0) 推荐(0) 编辑
摘要: __cdecl vc6.0:int __stdcall/__cdecl/__fastcall add(int x, int y){ return x+y;}void main(){ add(2,3);} 1.__stdcall: 1: int __stdcall add(int x, int y)2 阅读全文
posted @ 2016-10-30 16:35 Spobt 阅读(190) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示