addison-wesley-windows-system-programming-4ed-mtshart2010.pdf

(10460 KB) Pobierz
Windows System
Programming
Fourth Edition
Johnson M. Hart
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
New York • Toronto • Montreal • London • Munich • Paris • Madrid
Capetown • Sydney • Tokyo • Singapore • Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products
are claimed as trademarks. Where those designations appear in this book, and the publisher
was aware of a trademark claim, the designations have been printed in initial capital letters
or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no ex-
pressed or implied warranty of any kind and assume no responsibility for errors or omis-
sions. No liability is assumed for incidental or consequential damages in connection with or
arising out of the use of the information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk pur-
chases or special sales, which may include electronic versions and/or custom covers and con-
tent particular to your business, training goals, marketing focus, and branding interests.
For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419
corpsales@pearsontechgroup.com
For sales outside of the U.S., please contact:
International Sales
international@pearsoned.com
Visit us on the Web: informit.com/aw
Library of Congress Cataloging-in-Publication Data
Hart, Johnson M.
Windows system programming / Johnson M. Hart.
p. cm.
Includes bibliographical references and index.
ISBN 978-0-321-65774-9 (hardback : alk. paper)
1. Application software—Development. 2. Microsoft Windows (Computer file). 3. Applica-
tion program interfaces (Computer software). I. Title.
QA76.76.A65H373 2010
005.3—dc22
2009046939
Copyright © 2010 Pearson Education, Inc.
All rights reserved. Printed in the United States of America. This publication is protected by
copyright, and permission must be obtained from the publisher prior to any prohibited
reproduction, storage in a retrieval system, or transmission in any form or by any means,
electronic, mechanical, photocopying, recording, or likewise. For information regarding per-
missions, write to:
Pearson Education, Inc.
Rights and Contracts Department
501 Boylston Street, Suite 900
Boston, MA 02116
Fax: (617) 671-3447
ISBN-13: 978-0-321-65774-9
ISBN-10:
0-321-65774-8
Text printed in the United States on recycled paper at Courier in Westford, Massachusetts.
First printing, February 2010
To Andrew and William
This page intentionally left blank
Contents
Figures xvii
Tables xix
Programs xxi
Program Runs xxv
Preface xxvii
About the Author xxxvii
CHAPTER 1
Getting Started with Windows
Operating System Essentials
Windows Evolution
Windows Versions
2
3
5
6
1
1
The Windows Market Role
Windows, Standards, and Open Systems
Windows Principles
7
32-bit and 64-bit Source Code Portability
The Standard C Library: When to Use It for
File Processing 10
What You Need to Use This Book
11
10
Example: A Simple Sequential File Copy
Summary
Exercises
20
22
13
CHAPTER 2
Using the Windows File System and
Character I/O 25
The Windows File Systems
File Naming
27
vii
26
Zgłoś jeśli naruszono regulamin