摘要: // 注入Dll.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include int _tmain(int argc, _TCHAR* argv[]) { //1 得到要被注入进程的句柄 HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE,792 ); //2... 阅读全文
posted @ 2016-03-29 21:25 天还是那么蓝 阅读(153) 评论(0) 推荐(0) 编辑
摘要: // 文件映射-共享内存服务端.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "windows.h" int _tmain(int argc, _TCHAR* argv[]) { HANDLE hMapFile = CreateFileMapping( INVALID_HANDLE_VALUE, ... 阅读全文
posted @ 2016-03-29 21:25 天还是那么蓝 阅读(183) 评论(0) 推荐(0) 编辑
摘要: // 文件映射-操作文件.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include int _tmain(int argc, _TCHAR* argv[]) { HANDLE hFile; // 文件句柄 HANDLE hMapFile; // 文件内存映射区域的句柄 LPVOID lpMapAd... 阅读全文
posted @ 2016-03-29 21:23 天还是那么蓝 阅读(125) 评论(0) 推荐(0) 编辑
摘要: // VirtualProtect.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "windows.h" typedef void (*FUN)(); FUN fun = NULL; int _tmain(int argc, _TCHAR* argv[]) { char* p2 = "Helloworld"; cha... 阅读全文
posted @ 2016-03-29 21:22 天还是那么蓝 阅读(853) 评论(0) 推荐(0) 编辑
摘要: // VirtualAlloc测试.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "windows.h" int _tmain(int argc, _TCHAR* argv[]) { // //预定一块区域,并不会占用物理内存 // LPVOID lpvBase = VirtualAlloc( // ... 阅读全文
posted @ 2016-03-29 21:20 天还是那么蓝 阅读(626) 评论(0) 推荐(0) 编辑
摘要: // Win原理第七天.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "windows.h" _declspec (thread) int a = 200; _declspec (thread) int b = 300; void Fun() { printf("%d", a); //在不同的线程内,线程局部存储的全局变量... 阅读全文
posted @ 2016-03-29 21:17 天还是那么蓝 阅读(272) 评论(0) 推荐(0) 编辑