`

Windows Via C/Cpp:Overview2

 
阅读更多

Love:
Language never scale,but architecture does.
Date:
2011_10_24
By:
HYP(my name first letter makes it)
Sentences:
Originally Adapted From: 《Windows via C/C++ ,Fifth Edition》
Although this book does not cover  some Windows concept--such as the Component Object Model
(COM)--COM is built on top of basic building blocks such as processes,threads,memory management,DLLs,thread local storage,Unicode,and so on.
If you know these basic building blocks,
understanding COM is just a matter of understanding how the building blocks are used.
I have great sympathy for people who attempt to jump ahead in learning COM's architecture.
They have a long road ahead and are bound to have gaping holes in their language,which is
bound to negatively affect their code and their software development schedules.


The Microsoft .NET Framework's common language runtime(CLR) is another technology not specifically
addressed in this book.(However,it is addressed in my other book:CLR via C#,Jeffrey Richter).
However,the CLR is implemented as a COM object in a dynamic-link library(DLL) that loads in a process and
uses threads to execute code that manipulates Unicode strings that are managed in memory.
So again,the basic building blocks presented in this book will help developers writing managed code.
In addition,by way of the CLR's Platform Invocation(P/Invoke) techonology,
you can call into the various Windows'APIs presented throughout this book.

So that's what this book is all about:
the basic Windows building blocks that every Windows developer (at least in my opinion)should be intimately aware of.
As each block is discussed,i also describe how the system uses these blocks and how your own applications can best take advantage of these blocks.
In many chapters,i show you how to create building blocks of  your own.
These building blocks,typically implemented as generic functions or C++ classes,
group a set of Windows building blocks together to create a whole that is much greater than the sum of its parts.

by me:
[
TAG001:
cover,这个用法是很好的哇。“涉及,关乎到”。...does not cover some Windows concepts.
]
[
TAG002:
COM--the abbreviation of the Component Object Model.wow,it is real a beauty name o。(in chinese ,it means “组件对象模型”)
abbreviation  [əbri:vi'eiʃən] 
n. 缩写
]
[
TAG003:
……is built on top of ...在……的基础上建立的。。
COM is built on top of basic buildiing blocks..oyeah,real nice words and sentence。
]
[
TAG004:
matter  ['mætə]     
n. U物质;麻烦,毛病;C事情,问题;内容,素材
vi. 有关系,要紧
好句子:
If you know these basic building blocks,
understanding COM is just a matter of understanding how the building blocks are used.
a matter of doing sth.是一件……的事情。
]
[
TAG005:
sympathy  ['simpəθi]    
n. 同情,赞同,同感,慰问,吊唁
And other custom basic useful usage of SYMPATHY:

He is overflowing with sympathy.
他充满同情之心。
We extended our sympathy to the family.
我们向那家人表示同情。
I have no sympathy with your silly ideas.
我不赞成你那愚蠢的主意。
Your praise and sympathy upheld me greatly.
你的称赞和同情给予我很大的鼓励。
He has sympathy with his ill friend.
他同情他病中的友人。
]
[
TAG006:
to jump ahead in learning COM's architecture.
gap  [gæp]   
n. 间距

n. 通用汇编程序

n. 缝隙,缺口,间断

n. 差距,差额

vt. 打开缺口,造成缝隙

vi. 豁开
They have a long road ahead and are bound to have gaping holes in their language,which is
bound to negatively affect their code and their software development schedules.
(
I HAVE TO SAY ,YEAH,THIS SENTENCE IS REALLY THE TRUTH WHICH ACTUALLY TELLS THE SITUATION OF ME DURING MY DEVELOPMENT.
LEARN SOMETHING FORM IT .
)

negatively  ['negətivli]    
adv. 否定地;消极地;阴性

]
[
TAG007:
CLR :is the abbreviation form of Common Language Runtime。
equate to chinese words“通用语言运行时”
]
[
TAG008:
specifically  [spi'sifikli]      
ad. 特别地,具体地

address  [ə'dres]    
n.
v. 地址,写地址;致词,演说,对…说话;引导,引见,调用
n. 地址,(Internet中有三种地址表示形式。E-Mail地址、IP或Internet地址,以及硬件或MAC地址)
CUSTOMAL PHRASES:
inaugural address
就职演说,开幕词
form of address
头衔,称号
keynote address
n.政治性集会中之政策演讲
public address system
扩音装置
return address
v.[计]寄信人地址
CUSTOMAL USAGES:
I often get letters that addressed to my namesake David.
我经常收到寄给和我同名的David的信
They left the hotel and did not leave a forwarding address.
他们离开饭店时没有留下邮件的转递地址。
Be sure to put down the address of the receiver clearly.
注意要把收信人的地址写清。
The Queen addressed the crowd.
女王向群众发表了讲话。
The card was wrongly addressed to our old home.
那张明信片误写了我们的旧地址。
]
[
TAG009:
In additon.
by way of
In addition,by way of the CLR's Platform Invocation(P/Invoke) techonology,
you can call into the various Windows'APIs presented throughout this book.

So that's what this book is all about:
intimately  ['intimitli] adv. 亲切地,亲密地,个人性地
CUSTOMAL USAGES:
The rise of the city is intimately associated with the transition from handicraft to machine industry 
城市的兴起是同手工业向机器生产的过渡密切相关的。
The history of anthrax is intimately associated with the history of bacteriology and infectious disease 
炭疽病的历史与细菌学和传染病学的历史是密切相关的。
Only someone knowing the terrain intimately could have picked his way through all that underbrush 
只有熟知这一带地势的人才能择路穿行那片矮树林。
]
[
TAG010:
generic functions..是泛型函数的意思吗。。。
在C#中,有generic method,means 泛型方法。
just please see this site:http://msdn.microsoft.com/en-us/library/twcad0zb%28v=vs.80%29.aspx

These building blocks,typically implemented as generic functions or C++ classes,
group a set of Windows building blocks together to create a whole that is much greater than the sum of its parts.
最后的总结之句,写的很精彩。
a set of
group …… together to do

]
###############################################################################################
Sentences:
64-BIT WINDOWS
 
 Microsoft has been shipping 32-bit versions of Windows that support the x86 CPU architecture for many years.
 Today,Microsoft also offers 64-bit versions of Windows that support the x66 and IA-64 CPU architectures.
 Machines based on these 64-bit CPU architectures are fast gaining acceptance.In fact,in the very near future,
 it is expected that all desktop and server machines will contain 64-bit CPUS.
 Because of this,Microsoft has stated that Windows Server 2008 will be the last 32-bit version of Windows ever!
 For developers,now is the time to focus on making sure your applications run correctly on 64-bit Windows.
 To this end,this book includes solid coverage of what you need to know to have your applications  run on
 64-bit Windows(as well as 32-bit Windows).

 Here is a quick look at what you need to knw about 64-bit Windows:
 a)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.
 b)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.
 c)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..
 d)Because it is so easy to port 32-bit code,there are already device drivers,tools,and applications availabe 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 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.
 d)
 There is little new for you to learn.You will be happy to know that most data types remain 32 bits wide.
 These include ints,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.

 Because Microsoft offers so much information on how to modify your existing source code to be 64-bit ready,
 i will not go into those details in this book.
 However,i thought about 64-bit Windows as i wrote each chapter.
 Where appropriate,i have included information specific to 64-bit Windows.
 In addtion,i have compiled and tested all the sample aplications in this book for 64-bit Windows.
 SO,if you follow the sample applications in this book and do as i've done,
 you should have no trouble creating a single source-code base that you can easily compile for 32-bit or 64-bit Windows.


 ##############################################################################################
 WHAT'S NEW IN THE FIFTH EDITION?
 
 In the past,this book has been titled Advanced Windows NT,Advanced Windows,and Programming Applications for Microsoft Windows.
 In keeping with tradition,this edition of the book has gotten a new title:Windows via c/c++.
 This new title indicates that the book is for C and C++ programmers wanting to understand Windows.
 This new edition covers more than 170 new functions and Windows features that have been introduced in Windows XP,
 Windows Vista,and Windows Server2008.

 Some chapters have been completely rewritten--such as Chapter 11,which explains how the new thread pool API should be used.
 Existing chapters have been greatly enhanced to present new features.
 For example ,Chapter 4 now includes coverage of User Account Control and Chapter 8 now covers new synchronization mechanisms
 (interlocked Singly-Linked List,Slim Reader-Writer Locks,and condition variables).

 I also give much more coverage of how the C/C++ run-time library interacts with the operating system--particularly on
 enhancing security as well as exception handling.
 Last but not least,two new chapters have been added to explain how I/O operations work and to dig into the new Windows
 Error Reporting system that changes the way you must think about application error reporting and application recovery.


 In addtion to the new organization and greater depth,i added a ton of new content.
 Here is a partial list of enhancements made for this editon:
    a)New Windows Vista and Windows Server2008 features
       Of course,the book would not be a true revision unless it covered new features offered in Windows XP,Windows Vista,
       Windows Server 2008,and the C/C++ run-time library.This edition has new information on the secure string functions,
       the kernel object changes(such as namespaces and boundary descriptors),thread and process attribute lists,thread and
       I/O priority scheduling,synchronous I/O cancellation,vectored exception handling,and more.

    b)64-bit Windows support
        The text addresses 64-bit Windows-specific issues;all sample applications have been built and tested on 64-bit Windows.

    c)Use of C++
       The sample applications use C++ and reauire fewer lines of code,and their logic is easier to follow and understand.

    d)Reusable code
       Whenever possible,i created the source code to be generic and reusable.
       This should allow you to take individual functions or entire C++ classes and drop them into your own applications with little or no modification.
       The use of C++ made reusability much easier.

    e)The ProcessInfo utility
       This particular sample application from the earlier editons has been enhanced to show the process owner,command line,and UAC-related details.

    f)The LockCop utility
       This sample application is new.It shows which processes ares running on the system.
       Once you select a process,this utility lists the threads of the process and,for each,on which kind of synchronization mechanism it is blocked--with deadlocks explicityly pointed out.
    g)API hooking
        I present updated C++ classes that make it trivial to Hook APIs in one or all modules of a process.
        My code even traps run-time calls to LoadLibrary and GetProcAddress so that your API hooks are enforced..

    h)Structured exception handling improvements
        I have rewritten and reorganized much of the structured exception handling material.
        I have more information on unhandled exceptions,and i've added coverage on customizing Windows Error Reporting to fulfill your needs.


##########################################
Code Samples and System Requirements.

 The sample applications presented throughout this book can be downloaded from the book's companion content Web page at
 http://www.xxxxxx.com
 To build the applications,you 'll need Visual Studio 2005 (or later),the Microsoft Platform SDK for Windows Vista and Windows Server2008(
 which comes with some versions of Visual Studio).
 In addtion ,to run the applications,you 'll need a computer(or virtual machine) with Windows Vista(or later)installed.

分享到:
评论

相关推荐

    Data Cleaning: Overview and Emerging Challenges 英文论文

    Chu X, Ilyas IF, Krishnan S, Wang J. Data cleaning: Overview and emerging challenges. InProceedings of the 2016 International Conference on Management of Data 2016 Jun 26 (pp. 2201-2206). ACM.

    SAP BW/4 Overview New 2022

    SAP BW/4 Overview New 2022 SAP BW/4 Overview 是 SAP 公司推出的一个数据仓库解决方案,旨在帮助企业快速构建和实施数据仓库,提高业务智能和分析能力。下面我们将对 SAP BW/4 Overview 进行详细的介绍。 首先,...

    cedille:Cedille,一种基于依赖Lambda消除演算的依赖类型编程语言

    储存库内容重点cedille-mode/ :用于Cedille Emacs模式的Elisp代码cedille-tests/ :Cedille Emacs前端的单元测试core/ :Cedille Core Checker的Haskell实现language-overview/ :示例Cedille程序,展示了其一些...

    汇顶BLE规格书 GR551x_Datasheet_Rev.2.4

    一、GR551x Overview GR551x是一款BLE芯片,具有低功耗、低成本、低面积等特点,广泛应用于智能家居、可穿戴设备、医疗设备、工业自动化等领域。GR551x支持BLE 5.0规范,具有高达2Mbps的数据传输速率,适用于高速...

    A basic Windows service in VB (VBWindowsService)

    WINDOWS SERVICE : VBWindowsService Project Overview ============================================================================= ////////////////////////////////////////////////////////////////////...

    「渗透测试」Momigari:Overview_of_the_latest_Windows_OS_kernel_explo

    「渗透测试」Momigari:Overview_of_the_latest_Windows_OS_kernel_exploits_found_in_the_wild - 安全漏洞 数据安全 安全活动 NGFW 技术分析安全人才

    delftrnaseq:代尔夫特生物信息学实验室使用的 RNA-Seq 管道

    德尔福酶代尔夫特生物信息学实验室用于配对和单端读取的 RNA-Seq 管道。...明星: : SAMTOOLS: ://samtools....HTSeq: ://www-huber.embl.de/users/anders/HTSeq/doc/overview.html FastQC: : Matplotlib: http :

    MIMIC 重症监护数据库网站(当前版本为 MIMIC-III)

    有关说明,请参阅: http: //gohugo.io/overview/installing/ 克隆网站存储库: git clone --recursive https://github.com/MIT-LCP/mimic-website.git 在命令行运行hugo server以构建网站并提供页面; 查看网址:...

    TI DSP/BIOS Kernel Technical Overview

    ### TI DSP/BIOS Kernel 技术概述 #### 一、DSP/BIOS Kernel 在应用程序开发周期中的作用 TI(德州仪器)DSP/BIOS Kernel 是一个为开发者提供实时服务的内核,它用于构建数字信号处理器 (DSP) 应用程序并管理应用...

    SAP R/3 OVERVIEW

    SAP R/3 OVERVIEW

    IEEE Std 802c-2017 Local and Metropolitan Area Networks:Overview

    提供的“IEEE Std 802c-2017 Local and Metropolitan Area Networks:Overview and Architecture Amendment 2:Local Medium Access Control (MAC) Address Usage -完整英文电子版(26页).pdf”文件,很可能是对...

    Deep Learning in Neural Networks: An Overview

    这篇名为“Deep Learning in Neural Networks: An Overview”的论文为读者提供了一个全面且深入的深度学习概述,作者们详细介绍了该领域的基本概念、模型以及最新进展。 首先,深度学习的核心在于神经网络。神经...

    ISO/IEC 27000:2018 英文原版

    ISO/IEC 27000:2018 — Information technology — Security techniques — Information security management systems — Overview and vocabulary (fifth edition) ISO/IEC 27000:2018 — 信息技术 — 安全技术 —...

    Flink windows安装包

    在Windows环境部署官方Flink 1.17.1版本,发现TaskManager启动失败,无法运行job。 修复启动错误重新打包,直接运行start-cluster.bat即可启动,启动成功后打开浏览器http://localhost:8081/#/overview 显示 ...

    fantasy-football-service:获得幻想排行榜的简单服务

    联赛 /league/:int/overview返回联赛名称、球队及其位置数据。经理 /manager/:int/overview返回经理职业生涯、球队名称、价值、联赛、积分和赛季历史的概述。 /manager/:int/transfers深入了解本赛季经理人的转会...

    Oracle Solaris 8 Sun Fire 15K/12K Software Overview Guide-38

    Oracle Solaris 8 Sun Fire 15K/12K Software Overview Guide-38 是一份由Sun Microsystems(现已被Oracle公司收购)发布的技术文档,旨在为用户和管理员提供Oracle Solaris 8操作系统在Sun Fire 15K和12K服务器上的...

    albeco/LaserPulse:LaserPulse 是用于非线性和超快光学仿真的 Matlab 类。-matlab开发

    LaserPulse 是用于非线性和超快... 更多信息可以在这里找到: http : //albeco.github.io/LaserPulse/ 可以在此处找到简明的概述和示例代码: http : //albeco.github.io/LaserPulse/manual/laserpulse_overview.html

    IPv6协议安装指南

    本文将详细介绍如何在Windows操作系统中安装配置IPv6协议,包括Windows XP、Windows 2003以及Windows 2000等不同版本的操作系统。 #### Windows XP / Windows 2003 下的配置命令 **安装IPv6协议栈** - **Windows ...

Global site tag (gtag.js) - Google Analytics