热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

WindowsViaC/C++

这个是windows核心编程的第五版,作者JeffreyRichter.非常著名的一本书。写的比较底层。听说windows下编程要先看ptzold,再看
这个是windows核心编程的第五版,作者Jeffrey Richter.非常著名的一本书。写的比较底层。

听说windows下编程要先看ptzold,再看win32多线程程序设计,最后看这本书。匆匆的扫了几眼,这本书为什么放在最后呢? 感觉不是那么深呀!而且内容感觉乱乱的!

哈哈,还没看呢,这就下结论了,卑鄙呀!

我想windows下的编程基础还有2本书要看:Windows internals(5th),潘爱民的windows内核原理与实现。老潘的书最后看,源码分析呀!比较难啃。

windows核心编程,不准备很快的看完,慢慢看就好了。

2012.8.22

Introduction

        Here is a quick look at what you need to know about 64-bit Windows:

  • The 64-bit Windows kernel is a port of the 32-bit Windows kernel. This means that all the details and intricacies that you've learned about 32-bit Windows still apply in the 64-bit world. In fact, Microsoft has modified the 32-bit Windows source code so that it can be compiled to produce a 32-bit or a 64-bit system. They have just one source-code base, so new features and bug fixes are simultaneously applied to both systems.

  • Because the kernels use the same code and underlying concepts, the Windows API is identical on both platforms. This means that you do not have to redesign or reimplement your application to work on 64-bit Windows. You can simply make slight modifications to your source code and then rebuild.

  • For backward compatibility, 64-bit Windows can execute 32-bit applications. However, your application's performance will improve if the application is built as a true 64-bit application.

  • Because it is so easy to port 32-bit code, there are already device drivers, tools, and applications available for 64-bit Windows. Unfortunately, Visual Studio is a native 32-bit application and Microsoft seems to be in no hurry to port it to be a native 64-bit application. However, the good news is that 32-bit Visual Studio does run quite well on 64-bit Windows; it just has a limited address space for its own data structures. And Visual Studio does allow you to debug a 64-bit application.

  • There is little new for you to learn. You'll be happy to know that most data types remain 32 bits wide. These includeints,DWORDs,LONGs,BOOLs, and so on. In fact, you mostly just need to worry about pointers and handles, since they are now 64-bit values.




第一章 介绍一些Error返回号

第2章

这章主要介绍字符串的处理和unicode的使用

1. UTF-16虽然不能代表所有字符,但是可以把常用字符包括了,基本够用了,可以节省空间。而且UTF-16 supports surrogates, which are a way of using 32 bits (or 4 bytes) to represent a single character。

2.  If you call any Windows function passing it an ANSI string (a string of 1-byte characters), the function first converts the string to Unicode and then passes the Unicode string to the operating system.

3. StrSafe.h中定义安全处理字符串的函数

4. 字符串和字符才考虑Unicode处理

第3章 kernel object

1. kernel objects包括:access token objects, event objects, file objects, file-mapping objects, I/O completion port objects, job objects, mailslot objects, mutex objects, pipe        objects, process objects, semaphore objects, thread objects, waitable timer objects, and thread pool worker factory objects

2. 使用Windows核心对象要注意安全

3. kernel object继承是什么东西呀?

4. 进程通信的Mutex等,名字是唯一的,也是是AB使用MutexA通信,则C不能再创建一个MutexA.

    有个问题,linux中如何保证这样的变量不重名呢?万一重名了,不就挂掉了?

5. Terminal Services Namespaces

6. If you want to ensure that the kernel object names created by your own applications never conflict with any other application's names or are the subject of hijack attacks, you can define a custom prefix and use it as a private namespace as you do with
Global and
Local. The server process responsible for creating the kernel object defines a
boundary descriptor that protects the namespace name itself.

7. 为什么进程间要共享内核对象呢?

   进程之间有时候需要共享某个内核对象,比如两个进程之间可以通过共享同一个文件映射对象来传递数据,或者共享管道内核对象记性进程间通讯,也可能需要共享互斥对象、信标和事件对象进行进程间同步。 先说说什么是内核对象,内核对象是一种特殊的数据结构,进程在使用Create***函数创建内核对象的时候,操作系统以这个内核对象对应的数据结     构在内核中开辟一块内存,这块内存就是内核对象。没一个内核对象都对应着一个唯一的在内核中的内核地址,但是为了安全,这个地址不能直接      给进程使用,因此每一个进程都维护一个独立的内核对象地址和一个代表这个内核地址的句柄的进程句柄表

第一部分完结



2012.9.5




推荐阅读
  • 下面,我用最简洁的文字尽可能作最详尽的回答:两者之间存在的“五大不同”。与此同时,着重说明MicrosoftWindows64位(x64)操作系统,相对于32位(x86)操作系统的最大优势和劣势是什 ... [详细]
  • 左上角|开局_#冲刺创作新星# O了个H(OpenHarmony羊了个羊复刻学习)
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了#冲刺创作新星#O了个H(OpenHarmony羊了个羊复刻学习)相关的知识,希望对你有一定的参考价值。 ... [详细]
  • 序言   QBittorrent是一个新的轻量级BitTorrent客户端,可运行于Linux、windows及其他可能系统,它简单易用,漂亮的外观,功能强大,是linux下的 ... [详细]
  • 编程实现QQ表情文件CFC格式
    编程实现QQ表情文件CFC格式背景:最近闲来无事,也应论坛某会员要求,想做个QQ表情下载的站点。本来事情是很简单的,写个小小 ... [详细]
  • 以下是实验程序的源代码:***********************pthread.c***************************#include#inc ... [详细]
  • Linux多线程(2)
    线程的知识点太多,太重要,所以分成三部分进行总结学习线程安全多个线程并发同一段代码时,不会出现不同的结果。常见对全局变量或者静态变量进行操作,并且没有锁保护的情况下,会出现该问题。 ... [详细]
  • 一般枚举.Net控件的项目(MenuStrip,ToolStrip,StatusStrip)我有一些代码,通常会在表单中获取所有控件并将它们放在列表中。这是一些代码:private ... [详细]
  • MFC建立应用程序启示录(创世纪新篇)
    MFC是vc+的核心部分,需要一定的编程功底。?Windows编程基础编制一个功能强大和易操作的Windows应用程序所需要的代码肯定会比一般的C++程序要多得多,但并不是所有的代 ... [详细]
  • 未加载mscorlib.pdb
    前言:早上上班按照正常流程打开VisualStudio,调试本地项目,然后奇怪的是一直提示未加载mscorlib.pdb,导致项目无法正常运行,经过一番折腾最后解决了这个突如其来的 ... [详细]
  • JVMVisualVM学习
    使用VisualVM进行性能分析及调优WeiboGoogle用电子邮件发送本页面8概述开发大型Java应用程序的过程中难免遇到内存泄露、性能瓶颈等问题,比如文件、网 ... [详细]
  • 一、下载并解压缩wxWidgets  1.到http:www.wxwidgets.orgdownloads下载一个wxMSW版本的wxWidgets。(wxMSW是专门针对Windows系 ... [详细]
  • ICE(InternetCommunicationsEngine)是一个为现实中程序员而写的中间件平台。作为一个高性能的互联网通信平台,ICE包含了很多分层的服务和插 ... [详细]
  • 导读:今天编程笔记来给各位分享关于php技术员是什么的相关内容,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!本文目录一览: ... [详细]
  • 一段程序结束等待进行下一段程序_给你的Java程序拍个片子吧:jstack命令解析
    前言如果有一天,你的Java程序长时间停顿,也许是它病了,需要用jstack拍个片子分析分析,才能诊断具体什么病症ÿ ... [详细]
  • 微软Visual Studio 2010正式发布
      微软新一代开发平台VisualStudio2010正式发布visualstudio2005下载。千位中国开发菁英与世界五大城市同步迎接跨世代开发工具 ... [详细]
author-avatar
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有