没有合适的资源?快使用搜索试试~ 我知道了~
Programming Applications for Microsoft Windows
5星 · 超过95%的资源 需积分: 10 55 下载量 99 浏览量
2015-04-18
20:53:08
上传
评论
收藏 12.47MB PDF 举报
温馨提示
试读
923页
Programming Applications for Microsoft Windows
资源推荐
资源详情
资源评论
[Previous] [Next]
PUBLISHED B Y
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-639 9
Copyright © 1999 by Jeffrey Richte r
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means withou t
the written permission of the publisher.
Library of Congress Cataloging-in-Publication Data
Richter, Jeffrey.
Programming Applications for Microsoft Windows / Jeffrey Richter .
p. cm .
ISBN 1-57231-996- 8
1. Application software--Development. 2. Microsoft Window s
(Computer file) I. Title .
QA76.76.A65R54 1999
005.26'8--dc21 99-4045 6
CI P
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 WCWC 4 3 2 1 0 9
Distributed in Canada by Penguin Books Canada Limited.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information about internationa l
editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329 .
Visit our Web site at mspress.microsoft.com .
Intel is a registered trademark of Intel Corporation. Developer Studio, Microsoft, Microsoft Press, MS-DOS, Visual Basic ,
Visual C++, Visual Studio, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporatio n
in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks o f
their respective owners.
The example companies, organizations, products, people, and events depicted herein are fictitious. No association with an y
real company, organization, product, person, or event is intended or should be inferred .
Acquisitions Editor: Ben Ryan
Project Editor: Rebecca McKay
Technical Editors: Jack Beaudry, Donnie Cameron
Manuscript Editors: Ina Chang, Rebecca McKay
[Previous] [Next]
Introduction
Microsoft Windows is a complex operating system. It offers so many features and does so much that it's impossible for an y
one person to fully understand the entire system. This complexity also makes it difficult for someone to decide where to star t
concentrating the learning effort. Well, I always like to start at the lowest level by gaining a solid understanding of the system' s
basic building blocks. Once you understand the basics, it's easy to incrementally add any higher-level aspects of the system t o
your knowledge.
For example, I don't explicitly discuss the Component Object Model (COM) in this book. But COM is an architecture built usin g
processes, threads, memory management, DLLs, thread local storage, Unicode, and so on. If you know these basic buildin g
blocks, understanding COM is just a matter of understanding how the building blocks are used. I have great sympathy fo r
people who attempt to jump-start into learning COM's architecture. They have a long road ahead and are bound to hav e
gaping holes in their knowledge, which is bound to negatively affect their code and their schedules .
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 you r
own applications can best take advantage of these blocks. In many chapters, I show you how to create building blocks of you r
own. These building blocks, typically implemented as generic functions or C++ classes, group a set of Windows buildin g
blocks together to create a whole that is much greater than the sum of its parts .
[Previous] [Next]
Today's Windows Platforms
Currently Microsoft ships three different operating system kernels. Each kernel is optimized for a particular computin g
scenario. Microsoft is trying to lure software developers to Windows by stating that each platform offers the same application
programming interface (API). This simply means that when you learn how to write a Windows application for one kernel, yo u
know how to write a Windows application for any of the kernels.
Since this book explains how to write applications using the Windows API, whatever you learn from this boo k
applies—theoretically—to all the kernels. In reality, the kernels are different and so the operating system's functions ar e
implemented in different ways. This means that the underlying concepts are the same for the different kernels, but the detail s
might vary .
Let me start by introducing the three different Windows kernels.
The Windows 2000 Kernel
Windows 2000 is Microsoft's high-end operating system. It has a long shopping list of features. Here are some of them (in n o
particular order):
It is designed to run as a workstation, server, or data center.
The system is robust, which prevents a poorly written application from crashing the system .
The system is secure, which prevents unauthorized access to resources (such as files and printers) managed b y
the system.
The tools and utilities used to manage the system are very rich for the administrators within an organization .
The kernel is mostly written in C and C++, which makes the system easily portable to other CPU architectures .
The system natively supports Unicode, which makes localization and working with international languages easy .
The memory-management features offer extremely rich capabilities and high efficiency .
Structured exception handling (SEH) features allow for easy error recovery .
Dynamic-Link Libraries (DLLs) allow for easy extensibility .
Multithreading and support for multiple processors offer easy scalability to improve performance .
File system features offer great ways of tracking how users manipulate data on their machines .
The Windows 98 Kernel
Windows 98 is Microsoft's consumer-oriented operating system kernel. It has many of the features of Windows 2000 but it i s
missing some of the key features. For example, Windows 98 is not robust (an application can crash the system), it is no t
secure, it is a uniprocessor kernel (which restricts its ability to scale), and it does not offer the same degree of Unicod e
support.
Microsoft's goal is to kill off the Windows 98 kernel. This is because the Windows 98 kernel does not offer the features of th e
Windows 2000 kernel, and changing the Windows 98 kernel to support these features is too difficult. Plus, if they did modif y
the kernel to support these features, the kernel would match the Windows 2000 kernel anyway. So the Windows 2000 kerne l
should be with us for a long time, and the Windows 98 kernel has just a few years (if that) left in it .
Why does the Windows 98 kernel exist at all? The answer is that Windows 98 is more end user-friendly than Windows 2000 .
Consumers don't like to log on to their computers, they don't like to administer their computers, and so on. Plus, consumer s
(arguably) tend to play games more than corporate employees do. Many older games tend to access hardware directly, whic h
can crash the machine. Windows 2000—a robust operating system kernel—doesn't allow this. Any application that attempt s
direct hardware access on Windows 2000 is immediately terminated with no ill effect on the machine or other applications .
For these reasons, Windows 98 is still with us, and the consumer market for it is quite large. Microsoft is actively working o n
making Windows 2000 more end user-friendly, and a version of the Windows 2000 kernel will soon be available for th e
consumer market. Because the Windows 2000 and Windows 98 kernels have similar feature sets, and because both kernel s
have a huge installed base, I have decided to concentrate on these two kernels in this book .
Throughout the book, I discuss various Windows features. Where appropriate, I have placed notes with kernel-specific icons i n
the text—as shown here—to draw attention to implementation details particular to one kernel or the other .
Windows 98
This is an implementation detail specific to the Windows 98 platform .
Windows 2000
This is an implementation detail specific to the Windows 2000 platform .
Even though I don't explicitly mention Windows 95 in this book, the information that I present for Windows 98 applies equall y
well to Windows 95 since both operating systems use the exact same kernel. I simply refer to Windows 98 in the book—rathe r
than always mentioning both Windows 95 and Windows 98—to allow for a more readable text .
The Windows CE Kernel
Windows CE is Microsoft's most recent Windows kernel. This new operating system was created to fit the needs of smal l
hardware devices such as handheld computers, auto PCs, smart terminals, toasters, microwave ovens, and vendin g
machines. These devices typically must use a minimal amount of power, have small amounts of memory, and have little (i f
any) persistent storage (such as a disk drive). Because of these hardware restrictions, Microsoft was forced to create a ne w
operating system kernel that had a smaller footprint than that of either Windows 2000 or Windows 98 .
Amazingly enough, Windows CE is quite powerful and offers many features. Since Windows CE machines are geared towar d
the individual, the kernel does not need a lot of support for administration, scalability, and so on. Although I don't specificall y
cover Windows CE in this book, many of the concepts discussed throughout apply to this platform. Differences that do exis t
are usually due to the limitations Windows CE has on the various functions. The material presented in this book should b e
thought of as a companion to any additional information regarding Windows CE .
剩余922页未读,继续阅读
资源评论
- shenzhibo2018-01-09windows经典书籍,入门必看。不但对windows,对理解其他os,理解进程、线程,也很有意义
夜行歌
- 粉丝: 15
- 资源: 94
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功