随笔分类 -  Windows程序设计(第三版)

有关这本书的所有例子,没有的话。。。就是我没写O(∩_∩)O
摘要:先贴代码: _AFXTLS_.h: 1 #ifndef _AFXTLS_H_ 2 #define _AFXTLS_H_ 3 #include<stdio.h> 4 #include<windows.h> 5 #include<stddef.h> 6 #include<iostream> 7 usin 阅读全文
posted @ 2017-02-15 00:32 泛未分晨 阅读(685) 评论(0) 推荐(0)
摘要:主要只说容易被忽略的点,一些文档上和网上易找到的就不再赘述。主要可参考MSDN,另附一博客:http://blog.chinaunix.net/uid-28466562-id-3556326.html ,主要讲述了LocalAlloc及GlobalAlloc一些点。而我这里要说的,是这些上所没有的, 阅读全文
posted @ 2017-02-10 23:54 泛未分晨 阅读(958) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 6 int g_nTlsNum; 7 UINT __stdcall ThreadProc(LPVOID); 8 void InitialStartTime(); 9 DWORD GetUsedTime(); 10 11 UINT __stdcall ThreadProc(LPVOID... 阅读全文
posted @ 2017-02-01 22:59 泛未分晨 阅读(381) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 6 HANDLE g_hEvent; 7 UINT __stdcall ThreadProc(LPVOID); 8 int main(int argc,char* argv[]) 9 { 10 unsigned uThreadId; 11 char szEventNam... 阅读全文
posted @ 2017-02-01 22:58 泛未分晨 阅读(178) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 6 int g_nCount1 = 0,g_nCount2 = 0; 7 bool g_bThread = true; 8 UINT __stdcall ThreadProc(LPVOID); 9 int main(int argc,char* argv[]) 10 { 11 ... 阅读全文
posted @ 2017-02-01 22:57 泛未分晨 阅读(225) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 6 int g_nCount1 = 0,g_nCount2 = 0; 7 bool g_bThreadProc; 8 CRITICAL_SECTION g_cs; 9 10 UINT __stdcall ThreadProc(LPVOID); 11 int main(int arg... 阅读全文
posted @ 2017-02-01 22:56 泛未分晨 阅读(159) 评论(0) 推荐(0)
摘要:当然这个在书上已经有了很多的解释,今天也太晚了,所以不再赘述,直接贴代码了。 我的和书上的是不大一样的,这个是你可以输入你想要修改的程序名称,之后查找值,最后修改。 如下: 测试程序是这个: 阅读全文
posted @ 2017-01-30 00:19 泛未分晨 阅读(521) 评论(0) 推荐(0)
摘要:这个程序是我再重新再看这本书时,想起的以前写过的一个这样的程序,如今想起来觉得也是很好,因为此处这个程序完美的融合了前面的知识点。 介绍一下,这个程序书上没有的,我想到这个可以后台运行用来持续关闭掉任意一个程序,只要知道程序名字,格式如“MicrosoftEdge.exe”,就可以后台关掉这个程序, 阅读全文
posted @ 2017-01-30 00:15 泛未分晨 阅读(301) 评论(0) 推荐(0)
摘要:如第一例,不赘言。 代码如下: 阅读全文
posted @ 2017-01-30 00:04 泛未分晨 阅读(226) 评论(0) 推荐(0)
摘要:这个很简单,书上就有其详细解释,故不再赘言。 代码如下: 阅读全文
posted @ 2017-01-30 00:02 泛未分晨 阅读(209) 评论(0) 推荐(0)