`
`
`
`ABB Inc.
`
`EXHIBIT 1010
`
`Page 1 of 221
`
`Page 1 of 221
`
`
`
`to Building
`
`Powerful
`
`The Fast Track
`
`Applications
`
`Object-Oriented
`
`KRAIG BROCKSCHMIDT
`
`PlI|l.'i'.i'
`
`Page 2 of
`
`Page 2 of 221
`
`
`
`PUBLISHED BY
`Microsoft Press
`
`A Division of Microsoft Corporation
`One Microsoft Way
`Redmond, Washington 98052-6399
`
`Copyright © 1994 by Kraig Brockschmidt
`
`All rights reserved. No part of the contents of this book may be reproduced or transmitted
`in any form or by any means without the written permission of the publisher.
`
`Library of Congress Cataloging-in-Publication Data
`Brockschmidt, Kraig, 1968-
`Inside OLE 2 / Kraig Brockschmidt.
`p.
`cm.
`Includes index.
`ISBN 1-55615-618-9
`
`1. Object-oriented programming (Computer science)
`Windows {Computer file)
`I. Title.
`QA76.64.B76
`1993
`005.43--dc20
`
`2. Microsoft
`
`9334953
`CIP
`
`Printed and bound in the United States of America.
`
`123-456789AGAG98765-4
`
`Distributed to the book trade in Canada by Macmillan of Canada, a division of Canada
`Publishing Corporation.
`
`Distributed to the book trade outside the United States and Canada by Penguin Books Ltd.
`
`Penguin Books Ltd, Harmondsworth, Middlesex, England
`Penguin Books Australia Ltd., Ringwood, Victoria, Australia
`Penguin Books NZ. Ltd., 182-190 Wairau Road, Auckland 10, New Zealand
`
`British Cataloging-in-Publication Data available.
`
`Microsoft and MS-DOS are registered trademarks and Visual C++, Windows, and
`Windows NT are trademarks of Microsoft Corporation. Apple is a registered trademark
`and Macintosh is 3. registered trademark of Apple Computer, Inc. Borland is a registered
`trademark of Borland International. Smalltalk is a registered trademark of Xerox
`Corporation.
`
`Acquisitions Editor: Dean Holmes
`Project Editor: Ron Lamb
`Technical Editor: Seth McEvoy
`
`Page 3 of 221
`
`Page 3 of 221
`
`
`
`
`
`CONTENTS
`
`Preface
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`_
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`. .. XV
`
`.
`
`. xxii
`
`Using the Compamm Disks .
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`SECTION I
`
`WINDOWS OBJECTS
`
`CHAPTER 1
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`. .. 3
`
`AN OVERVIEW OF OLE 2 .
`
`.
`
`.
`
`Windows Objects: The Component Object Model
`Objects and Interfaces .
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Structured Storage and Compound Files .
`.
`.
`.
`.
`.
`Uniform Data Transfer and Notification .
`.
`.
`.
`.
`.
`Notification .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Data Objects and the Clipboard .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Data Objects and Drag-and-Drop
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Data Objects and Compound Documents .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Data Objects and DDE .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Compound Documents: Object Embedding .
`.
`.
`.
`.
`.
`.
`Compound Documents: Object Linking and Monikers
`Compound Documents: In—Place Activation (Visual Editing)
`Automation .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`,
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`,
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`_
`
`_
`.
`.
`_
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`_
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`_
`_
`.
`_
`.
`
`.
`.
`.
`,
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`_
`.
`.
`,
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`_
`.
`.
`.
`.
`
`. 5
`.
`. 8
`.
`. 12
`. 15
`. 17
`
`. 17
`. 17
`. 18
`. 19
`. 19
`. 21
`, 23
`. 24
`
`CHAPTER 2
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`. _. 27
`
`CONVENTIONS, C++, AND SAMPLE CODE .
`
`To C or Not to C (with Apologies to Shakespeare)
`User—Definc-cl Types: C++ Classes
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`Access Rights .
`.
`.
`.
`.
`_
`.
`_
`.
`.
`_ _.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Single Inheritance
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Virtual Functions and Abstract Base Classes .
`
`.
`
`.
`
`.
`.
`_
`.
`.
`
`.
`.
`.
`.
`,
`
`.
`.
`.
`.
`
`.
`.
`_
`.
`_
`
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`_
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Multiple Inheritance .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`Sample Code .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`,
`.
`.
`.
`.
`.
`.
`.
`Include Files: The INC Directory
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`Libraries: The LIB Directory .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`The BUILD Directory .
`.
`.
`.
`.
`.
`.
`.
`.
`Three Amigos: BttnCur, GizmoBar, and StatStrip .
`Class Libraries: The CLASSLIB Directory .
`.
`.
`.
`.
`.
`
`_
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`,
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`_
`.
`_
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`_
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`_
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`.
`,
`.
`.
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`. 27
`. 29
`33
`. 34
`37
`
`. 39
`. 41
`. 42
`43
`. 43
`44
`. 45
`
`Page 4 of 221
`
`Page 4 of 221
`
`
`
`INSIDE OLE2
`_
`
`.
`_
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`Interface Templates: The INTERFAC Directory .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Chapter Sources: The CHAPxx Directories
`.
`.
`.
`.
`.
`Cosmo: A Graphical Editor (with Apologies to No One in Particular)
`Patron: A Page Container (with Apologies to Merriam—Webster)
`.
`.
`Building and Testing Environment
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`_
`_
`_
`.
`_
`.
`_
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`
`. 48
`. 48
`. 49
`. 51
`. 54
`
`CHAPTER 3
`
`OBJECTS AND INTERFACES .
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`_
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`The Ultimate Question to Life, the Universe, and Objects
`.
`.
`.
`.
`.
`(with Apologies to Douglas Adams)
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Windows Objects vs. C++ Objects .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`.
`.
`.
`.
`_
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Let’s Go Traveling .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Other Differences Between Windows Objects and C++ Objects
`A Simple Object in C and C++: RECTEnumemt0r
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`RECTEnumemt0r and the IEnumRECT Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`
`_
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`
`_
`.
`
`.
`.
`.
`.
`
`.
`.
`_
`,
`
`.
`.
`.
`
`_
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`
`_
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`_
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`_
`
`.
`.
`_
`.
`
`.
`
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`
`. .. 57
`
`.
`.
`.
`.
`
`.
`
`. 58
`_ 64
`. 64
`. 67
`. 70
`. 72
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`_
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`Creating the REC']"iEnu1mmwr Object
`Using an IEnumRECT Pointer
`.
`.
`.
`.
`.
`Reference Counting .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`My Kingdom for Some Optimizationsl
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Call-Use-Release .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`l'Unkn0wn,theRootofAllEVil . ..
`.
`Querylnterfacevs. Inheritance .
`.
`.
`.
`.
`.
`.
`_
`.
`t
`.
`_
`_
`_
`.
`.
`.
`.
`.
`_
`.
`.
`.
`Querylnteafface Properties and Interface Lifetimes
`.
`.
`.
`.
`Some Data Types and Calling Conventions
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`STDMETHOD and Associates
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`HRESULT and SCODE .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Globally Unique Identifiers: GUIDS, IIDS, CLSIDS .
`OLE 2 Interfaces and API Functions .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`.
`.
`.
`.
`.
`Custom Interfaces .
`,
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`Interfaces vs. API Functions .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`,
`.
`.
`.
`
`.
`_
`.
`.
`.
`.
`.
`_
`.
`.
`.
`
`What Is a Windows Object? (Reprise)
`Summary..... .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`..
`
`.
`
`.
`.
`
`_
`.
`
`_
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`CHAPTER 4
`
`. 94
`.
`95
`.
`. 96
`.
`. 98
`.
`. 100
`.
`.. 101
`.
`. 103
`. 104
`. 106
`. 106
`. 107
`. 109
`.
`1 10
`. 112
`. 112
`
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`_
`.
`.
`.
`
`. 113
`.
`.
`. ..114
`
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`. ..
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`_
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`COMPONENT OBJECTS
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`(THE COMPONENT OBJECT MODEL)
`Where the Wild Things Are (with Apologies to Maurice Sendak)
`The New Application for Windows Objects .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Enlarge the Message Queue .
`.
`.
`.
`.
`.
`.
`_
`.
`_
`.
`.
`.
`.
`.
`_
`.
`.
`.
`Verify the Library Build Version
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Call Cofmtialize or Olelmtialize
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Call C0Uniniti(ilize or 0leUm'm'tz'a£ize
`.
`_
`.
`,
`,
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`
`.
`
`_
`
`.
`
`.
`
`_
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`. ..
`.
`_
`_
`.
`.
`,
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`_
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`
`. 117
`.
`1 19
`, 121
`122
`123
`124
`. 125
`
`_
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`Page 5 of 221
`
`Page 5 of 221
`
`
`
`Contents
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`. 126
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Memory Management and Allocator Objects
`138
`.
`,
`.
`Component Objects from Class Identifiers: A Component User .
`. 148
`.
`.
`.
`.
`.
`,
`#inz:£ude gmdh and Precompiled Headers
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 149
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Instantiate a Component Object
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 152
`.
`.
`.
`.
`.
`.
`Manage the Object and Call CoFreeUnu5edLibrcm'es
`.
`.
`.
`.
`. 153
`.
`.
`.
`.
`.
`.
`.
`.
`Implementing a Component Object and a Server .
`.
`.
`.
`.
`.
`RegisterCLSIDs
`.
`. ..
`..... .._174
`.
`.
`.
`.
`Implement the Class Facto
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 176
`.
`.
`.
`.
`.
`.
`.
`Expose the Glass Factory .
`.
`.
`_
`_
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 178
`.
`Provide an Unloading Mechanism .
`.
`.
`,
`.
`.
`_
`_
`.
`.
`_
`_
`_
`.
`. 182
`.
`.
`.
`.
`.
`.
`.
`Cosmo’s Polyline as a DLL Object
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 187
`_
`.
`.
`.
`_
`_
`.
`ObjectReusability ._
`.
`.
`.
`.
`......
`.
`.
`.
`.
`_
`.
`.
`.
`_
`._
`. 191
`_
`_
`.
`.
`.
`.
`.
`Case 1: Object Containment
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`_
`.
`.
`. 194
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Case 2: Object Aggregation
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 195
`Summary..................--\
`.._....__..201
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`_
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`.
`
`.
`
`.
`_
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`S E C T I O N
`
`I
`
`I
`
`OBJECT-ORIENTED SYSTEM FEATURES:
`
`FILES AND DATA TRANSFER
`
`C H A P T E R
`
`5
`
`STRUCTURED STORAGE AND COMPOUND FILES .
`Motivation .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`Patron Files with the jitters
`The Decaffeinated Alternative .
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`_
`
`.
`_
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`
`_
`
`.
`
`. ..
`.
`.
`
`. 205
`. .. 208
`
`. 209
`. 211
`
`.
`.
`
`.
`.
`
`.
`.
`
`_
`
`.
`.
`
`.
`
`.
`
`Energy Boosts Without the jitters: Compound Files
`Features of Compound Files .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Stream, Storage, and Lo.~:kBytas Objects
`.
`.
`.
`.
`.
`.
`.
`.
`.
`ElementNaming .
`.
`.
`.
`.
`.
`. ..
`.
`.
`.
`.
`_
`_
`._
`..
`AccessModes.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`. ..
`
`Transacted Storages
`Incremental Access .
`Shareable Elements
`
`.
`.
`.
`_
`.
`. .. .. .
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`
`_
`_
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`_
`.
`
`.
`.
`.
`
`.
`_
`.
`
`.
`
`.
`
`.
`_
`.
`
`.
`
`_
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Compound File Objects and Interfaces
`.
`.
`.
`.
`.
`.
`Storage Objects and the IS1f0mge Interface .
`.
`.
`.
`.
`.
`.
`Stream Objects and the IS£ream Interface .
`.
`.
`.
`.
`.
`Lockfiytas Objects and the ILockBytas Interface
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Compound Files in Practice .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`I
`.
`.
`.
`.
`.
`.
`.
`Simple Storage: Cosmo .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Pulling Rabbits from a Hat with STGM_CON\/ERT .
`Streams vs. Files
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`_
`.
`
`.
`
`.
`
`_
`.
`.
`.
`.
`._
`
`,
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`_
`.
`
`.
`
`.
`.
`.
`
`_
`.
`.
`
`.
`_
`.
`
`. 213
`.
`. 215
`.
`. 215
`.
`217
`_
`....,...217
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`_
`_
`
`,
`.
`.
`
`.
`.
`.
`.
`_
`.
`.
`_
`
`.
`
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`_
`
`.
`.
`.
`.
`_
`.
`.
`_
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`_
`
`.
`.
`.
`.
`_
`.
`.
`_
`
`.
`.
`.
`
`.
`_
`.
`
`. 219
`. 220
`_ 222
`
`. 223
`. 223
`. 227
`. 229
`. 233
`. 234
`_ 240
`_ 241
`
`Page 6 of 22111
`
`Page 6 of 221
`
`
`
`—
`
`INSIDE OLE2
`
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`,
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Complex Compound Files: Patron .
`.
`.
`.
`.
`.
`.
`.
`The Root Storage and Temporary Files .
`.
`.
`.
`.
`.
`.
`A
`Managing Substorages .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Multilevel Commits
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`File Save As Operations
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Low-Memory Save As Operations
`.
`.
`.
`.
`_
`.
`. _
`StreamsasMemoryStructures
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Other OLE 2 Technologies and Structured Storage .
`The IPersz'stStomge, IPersz'stStrecmz, and IPers2'5tFile Interfaces .
`.
`.
`.
`.
`.
`A Heavy Dose of Protocol with IPers2'stStamge .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`_
`Of Component Users and IPersz'stStomge: Component Cosmo .
`.
`.
`Of Component Objects and IPersistStomge: Polyline .
`.
`.
`.
`.
`_
`.
`.
`.
`.
`Compound File Defragmentation .
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Summary .
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`_
`.
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`CHAPTER 6
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`. 244
`.
`. 263
`.
`. 264
`.
`. 265
`.
`. 268
`.
`. 269
`.
`. ..271
`.
`.
`. 272
`.
`.
`. 273
`.
`.
`. 275
`.
`.
`. 278
`.
`.
`. 281
`.
`.
`. 288
`.
`. 297
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`
`. 299
`. 301
`. 302
`. 308
`.
`. 312
`.
`. 318
`.
`. 329
`.
`. 330
`.
`331
`.
`. 345
`.
`. 351
`.
`. 355
`.
`. 359
`.
`. 360
`.
`, 363
`.
`. 365
`.
`. 367
`.
`. 369
`.
`. 370
`.
`. 370
`.
`. 371
`.
`372
`.
`. 373
`.
`.
`. .. 383
`. ..385
`
`UNIFORM DATA TRANSFER USING DATA OBJECTS .
`What Is a Data Object?
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`New and Improved Ultra-Structures!
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Data Objects and the IDamObject Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`FORMATETC Enurnerators and Format Ordering
`.
`,
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`Component Data Objects
`.
`.
`.
`.
`.
`.
`.
`_
`.
`_
`_
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Some CDam0bjer:t Features
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`_
`.
`.
`.
`Implementing IDataObject
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`A (Component) Data Object User
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Advising and Notification with Data Objects .
`.
`.
`.
`.
`.
`,
`.
`.
`Establishing an Advisory Connection .
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Sending Notifications as a Data Object
`.
`.
`.
`.
`.
`Special Considerations for Remoted Notifications .
`.
`.
`.
`Inside the Advise Sink .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IDataObject as a Standard for Object Data Transfer
`.
`,
`.
`.
`.
`.
`.
`.
`View Objects and the IViewObject Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IV2'ewObject:.‘Dmw .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Rendering for a Specific Device
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`Drawing into a Metafile
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`_
`.
`_
`.
`.
`.
`.
`.
`Aborting Long Repaints
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Other IViewObject Member Functions
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IViewOb]'ect and Notification .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Freeloading from OLE2.DLL .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IDa£aObj.ectand DDE
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`, ..
`Summary .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`_
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`_
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`_
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`_
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`"'“
`
`Page 7 of 221
`
`Page 7 of 221
`
`
`
` Contents
`
`G H A P T E II
`
`7
`
`.
`.
`.
`
`.
`
`. 387
`CLIPBOARD TRANSFERS USING DATA OBJECTS __ .
`. 389
`.
`.
`.
`The OLE 2 Clipboard Protocol
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 391
`.
`.
`.
`But All I Want to Do Is Copy Some Simple Data!
`_
`.
`_
`.
`_
`.
`.
`.
`,
`.
`.
`.
`. 393
`.
`.
`.
`.
`.
`A Data Transfer Component Object
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 405
`.
`.
`.
`If You Already Have a Data Object...Component Cosmo
`.
`. 407
`.
`.
`.
`_
`If You Already Have Extensive Clipboard—I-Iandling Code .
`. 408
`.
`.
`.
`.
`Simple Data Source and Consumer: Cosmo .
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`. .. 408
`.
`.
`.
`.
`.
`Startup/Shutdown .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 409
`.
`.
`.
`.
`.
`Copy/Cut
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 411
`.
`.
`.
`.
`.
`Enabling Edit/Paste .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. .. 412
`.
`.
`.
`.
`.
`Paste .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`. 414
`.
`.
`.
`.
`.
`Paste Special and a Functional Patron .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`. 416
`_
`_
`.
`.
`_
`The Paste Special Dialog Box and the OLE2UI Library .
`_
`.
`.
`. 420
`.
`.
`.
`.
`.
`.
`Tenant Creation, Paste
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 424
`.
`.
`.
`.
`.
`.
`Saving and Loading Tenants
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`CopyandCut...,.................,......._...._......,425
`Summary .
`.
`.
`.
`.
`.
`_
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 426
`
`.
`
`_
`
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`
`_
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`G H A P T E R 8
`
`DRAG—AND-DROP OPERATIONS USING DATA OBJECTS ..
`Sources and Targets: The Drag-and-Drop Transfer Mode]
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`A Step-by-Step Drag-and-Drop Implementation: Cosmo _
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Design and Implement Drop Target User Feedback .
`.
`.
`.
`.
`Implement a Drop Target Object and the IDrapTarget Interface .
`IDr0pTarger,‘.':DmgEnter
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`.
`.
`.
`.
`.
`IDrt;;bTarget.'.'Dra:gOver
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IDr0pTarget.’.'DragLea~ae
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IDr0pTarget.':Dr0p .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Register and Revoke the Drop Target Object
`_
`.
`.
`.
`.
`.
`.
`.
`.
`Design and Implement Drop Source User Feedback .
`.
`.
`.
`.
`Determine the Pick Event .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`. 429
`. 430
`.
`_ 439
`_
`. 454
`.
`. 456
`.
`456
`_
`. 459
`.
`_
`. 460
`.
`.
`. .. 461
`.
`,
`. 462
`.
`. 464
`.
`. 464
`
`.
`
`.
`
`.
`
`.
`.
`_
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`Implement a Drop Source Object and the IDmpSource Interface
`Call DoDmgDrop .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Intermission .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Advanced Drag-and—Drop: Feedback and Scrolling in Patron .
`.
`.
`.
`.
`.
`Tenant Pick Regions and Drop Sourcing .
`.
`.
`.
`.
`_
`.
`_
`.
`.
`_
`.
`More Advanced Drop Target Hit-Testing _
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`A Feedback Rectangle .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Scrolling the Page
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`Summary .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`_
`.
`.
`
`.
`
`.
`
`. 465
`.
`466
`.
`. .. 468
`.
`.
`. 469
`_
`_
`. 470
`.
`.
`. 472
`.
`.
`. 474
`.
`. 477
`.
`. 482
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`
`Page 8 of 221
`
`Page 8 of 221
`
`
`
`INSIDE OLE2
`
`
`SECTION III
`
`COMPOUND DOCUMENTS: OLE
`
`c H A P 1' E R 9
`
`.
`
`.
`
`_
`
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`_
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`_
`.
`
`.
`
`.
`
`.
`
`.
`_
`.
`.
`
`.
`
`.
`.
`
`.
`
`_
`
`.
`
`.
`.
`
`.
`
`.
`_
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`_
`
`.
`
`. ..
`.
`.
`.
`_ __
`.
`.
`.
`.. .
`_
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`
`_
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`...
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.. .. .
`_
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`COMPOUND DOCUMENTS
`AND EMBEDDED CONTAINERS .
`.
`Compound Document Mechanisms
`.
`.
`.
`.
`The Passive State
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`The Loaded State
`.
`.
`..
`Case 1:InPmcServer........
`_
`.
`.
`.
`.
`.
`.
`.
`Case 2: InProcHcmd1er
`.
`.
`.
`.
`.
`.
`.
`. ..
`.
`.
`.
`.
`.
`_
`.
`.
`.
`Case 3: The Default Handler
`_
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Loading the Object: All Cases
`.
`.
`.
`_
`.
`.
`.
`.
`.
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Drawing the Object
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`_
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`The Running State .
`.
`.
`.
`.
`.
`.
`.
`.
`Mommy, Daddy, Where Do New Objects Come From? _
`The Structure ofa Container Application .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Embedding Containers Step by Step .
`.
`I
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Call Initialization Functions at Startup and Shutdown .
`Define Sites and Manage Site Storage .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Implement Site Interfaces and Add Site Variables .
`.
`.
`.
`.
`.
`Implement IAdvz'seSz'nk
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`Implement IO:IeCZientSite .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Implement Site Shading .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Invoke the Insert Object Dialog Box
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`l
`.
`.
`.
`.
`Call OleUIIn5ertObject
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Call OleCn.>ate or 0IeCrea:teFmmFz'le
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Initialize the Object
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Draw and Print Objects .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Activate Objects and Add the Object Verb Menu
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Mouse Double—Clicl<s
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`,
`.
`,
`.
`.
`.
`.
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Object Verb Menu .
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`The Right Mouse Button Pop-Up Menu .
`.
`.
`.
`.
`Create Objects from the Clipboard and Drag-and—Drop Transfers .
`Copy and Source Embedded Objects .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Close and Delete Objects
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`Save and Load the Document with Embedded Objects
`.
`.
`.
`.
`.
`Handle Iconic Presentations (Cache Control)
`.
`.
`.
`.
`.
`.
`.
`.
`Summary .
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`_
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`_
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`_
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`
`. 487
`. 489
`.
`490
`_
`. 491
`.
`.
`. .. 492
`.
`.
`. 493
`. 494
`. 496
`. 497
`. 500
`. 502
`504
`. 506
`507
`. 507
`511
`. 516
`519
`525
`. 527
`. 530
`. 532
`. 534
`. 538
`. 539
`542
`. 543
`. 547
`. 549
`. 552
`. 555
`. 556
`. 560
`. 562
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`Page 9 of 221
`
`Page 9 of 221
`
`
`
`0 H A P T E B 10
`
`COMPOUND DOCUMENTS AND
`
`EMBEDDED OBJECT SERVERS (EXES)
`
`_
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`The Structure of a Server Application .
`Linking Support and Mini—Servers vs. Full-Servers
`Version Numbers
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`_
`_
`_
`_
`.
`.
`.
`.
`Installation .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Embedding Servers Step by Step .
`Call Initialization Functions at Startup and Shutdown .
`Create Registration Database Entries
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`_
`Implement and Register a Class Factory .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Irnplement an Initial Object with IUnknown .
`.
`_
`_
`_
`.
`.
`Implement the IPer5istSt0rage Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`Implement the IDataObject Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Implement the IO[eObject Interface
`.
`.
`.
`.
`.
`.
`.
`_
`_
`_
`Modify the Server’s User Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Send Notifications
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`_
`.
`.
`
`Contents
`
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`_
`.
`
`.
`
`.
`
`.
`_
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`_
`.
`_
`.
`.
`
`.
`.
`.
`
`.
`
`. 565
`
`. 566
`_
`.
`. 568
`.
`.
`. 569
`.
`.
`. .. 569
`
`.
`.
`_
`.
`.
`
`.
`_
`.
`.
`
`.
`.
`
`.
`
`_
`.
`_
`.
`.
`
`. 570
`. 571
`_ 572
`. 577
`. 586
`. 594
`. 601
`. 610
`. 629
`. 633
`
`. 637
`.
`.
`. 638
`.
`.
`. .. 639
`
`.
`.
`_
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`
`_
`_
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`_
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`_
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`(Full-Servers) Add OLE 2 Clipboard Formats
`(Optional) MDI Servers, User Interface, and Shutdown .
`Summary .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`G H A P T E R 11
`
`|N—PROCESS OBJECT HANDLERS AND SERVERS .
`The Structure of In—Process Modules
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Why Use a Handler?
`.
`.
`.
`Why Use an In-Process Server?
`.
`Why Not Use an ln—Process Server?
`.
`.
`.
`Delegating to the Default Handler
`.
`.
`.
`.
`.
`.
`IOleObject
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IDataObjec£
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IPersistSt0mge (on the Cache)
`.
`.
`.
`.
`.
`.
`.
`.
`.
`IVz'ew0bjecI
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Implementing an Object Handler .
`.
`.
`.
`Obtain a Default Handler [Unknown .
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`_
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`Expose Default Handler Interfaces in Querylnterface .
`Implement IPersistStomge
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`,
`.
`.
`.
`.
`Implement IOleObject:.'GetExtem3 .
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`,
`.
`.
`Implement IViewObject
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Synchronized Swimming with Your Local Server
`.
`.
`.
`.
`Year—End Bonuses .
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`
`Notes on Implementing an In-Process Server
`Summary .
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`_
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`_
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`,
`.
`.
`
`.
`.
`
`.
`
`_
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`,
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`. .. _.. 641
`.
`.
`.
`.
`.
`.
`. 641
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`_
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`,
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`. 644
`.
`.
`. 646
`.
`.
`. 647
`.
`.
`. 648
`.
`.
`. .. 649
`. .. 651
`.
`.
`. 652
`. _. 652
`.
`.
`. 653
`.
`.
`. 656
`
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`
`.
`
`. 659
`. 662
`. 666
`. 668
`. 674
`. 678
`
`. 679
`.
`. ..692
`
`Page 10 of 22‘1
`
`Page 10 of 221
`
`
`
`INSIDE OLE2
` _m_
`
`CHAPTER 12
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`
`.
`...
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`
`. 695
`. 698
`. 899
`. 703
`. 704
`. 705
`. 709
`. 711
`.
`713
`.
`. .. 715
`.
`.
`. 717
`
`.
`.
`.
`
`. 722
`.
`. 727
`.
`. 744
`.
`. 747
`.
`.
`. .. 751
`
`.
`.
`.
`MONIKERS AND LINKING CONTAINERS .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Will Someone Please Explainjust What a Moniker Is? .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Moniker Classes
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Where Do I Get Monikers? .
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Step-by—Step Linking Container
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Enable Links from Insert Object
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Enable Linking from Clipboard and Drag-and—Drop Operations
`Paste Link and Paste Special Commands
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Drag—and—Drop Linking Feedback .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`_
`Test Your Linking .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`_ ..
`...
`.
`.
`.
`.
`.
`Implement the Show Objects Command .
`.
`.
`.
`.
`.
`.
`Manage a File Moniker, Call IOleObjec£.'.'SezM0m:'ker,
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`and Implement IOIeCI'iemSz'te:.'Getli/Irmiker
`.
`.
`.
`The Links Dialog Box and the IOleUILmkC0m£ainer Interface .
`Invoke the Links Dialog Box .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Update Links on Loading a Document
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Summary _
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`CHAPTER 13
`
`. .. 753
`IVIONIKEFI BINDING AND LINK SOURCES .
`.
`.
`. 755
`.
`.
`.
`.
`Moniker Binding Mechanisms
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 756
`.
`.
`.
`.
`A Simple Linked Object: Single File Moniker
`.
`. 758
`.
`A Linked Object with a Composite Filemem Moniker
`.
`. 762
`.
`Binding a Composite File."Item.’Item.’Item."I£em... Moniker
`. 764
`.
`.
`Bind Contents .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 765
`.
`.
`The Running Object Table .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 766
`.
`.
`A Simple Link Source: Cosmo .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 767
`.
`.
`Create, Register, and Revoke a File Moniker
`.
`.
`.
`.
`.
`. 770
`.
`.
`.
`.
`.
`Provide Link Source Formats in Data Transfer
`.
`.
`. 774
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Implement the IPerszlstFile Interface .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`777
`.
`.
`.
`.
`Implement I0le01y'ect.':SetMom'ker and I0leObject:.'GetM0niker
`. 779
`.
`.
`.
`.
`Complex Linking and Linking to Ernbeddings
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 780
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`Why Linking to Embedding? .
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`,
`.
`.
`.
`.
`.
`. 782
`.
`.
`.
`,
`.
`.
`_
`.
`.
`.
`.
`.
`Create and Manage the Composite Moniker
`.
`.
`.
`.
`.
`. 787
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Source the Composite Moniker
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`. 789
`.
`.
`Implement a Glass Factory for Document Objects with IPer5istFz'le
`. 792
`.
`.
`.
`Implement IOleItemC0ntaz'ner for Each Item Moniker
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Summary .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`,
`.
`. ........806
`
`.
`
`.
`.
`,
`.
`.
`.
`_
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`_
`.
`
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`,
`.
`.
`.
`.
`.
`.
`,
`
`.
`,
`
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`
`.
`
`.
`
`X"
`
`Page 11 of 221
`
`Page 11 of 221
`
`
`
` Contents
`
`0 H A P ‘I’ E H
`
`14
`
`CONVERSION, EIVIULATION,
`AND COMPATIBILITY WITH OLE 1
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`_
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`. ..
`
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`The Convert Dialog Box for Containers .
`Support a Convert Menu Item and Invoke the Convert Dialog Box
`Handle the Convert To Case .
`_
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`_
`Handle the Activate As Case
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`_
`.
`_
`_
`_
`_
`_
`_
`_
`.
`.
`.
`.
`
`_
`
`.
`
`Handle Display As Icon Changes .
`Conversion Between Servers .
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`
`.
`.
`_
`.
`_
`
`.
`.
`
`_
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`_
`
`.
`.
`
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`_
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`
`.
`.
`
`.
`_
`
`809
`
`. 810
`. 813
`. 816
`. 818
`
`. 820
`. 822
`
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`Registration Database Entries for Conversion
`.
`.
`.
`.
`IPersistSz,‘omge Modifications .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`OLE 1 Embedded Object Conversion and Emulation .
`Notes on OLE 1 Compatibility for Containers
`.
`.
`.
`.
`.
`OLE 1 Server Quirks .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`File Conversion .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`. 823
`. 826
`. 828
`. 833
`. 833
`834
`
`Summary .
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`.
`
`_
`
`.
`
`. ...
`
`.
`
`.
`
`._
`
`.
`
`.
`
`.
`
`.
`
`.
`
`_
`
`.
`
`.
`
`. .. 839
`
`S E C T I O N
`
`I V
`
`COMPOUND DOCUMENTS:
`
`IN-PLACE ACTIVATION
`
`C H A P T E R 15
`
`VISUAL EDITING:
`
`|N—PLACE ACTIVATION AND IN—F’LACE CONTAINERS .
`Motivations and the Guts of an In-Place Session
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Where Does It All Start? .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`An Innocent Little Dal/er!)
`.
`.
`_
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`.
`.
`.
`.
`.
`.
`_
`.
`_
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Activating In—Place
`.
`Manipulations of an Active Object
`_
`Pulling thePlug: Deactivation
`.
`.
`.
`.
`.
`.
`.
`.
`Active vs. UI Active and Inside-—Out Objects .
`.
`.
`.
`.
`.
`.
`.
`.
`Yes, This Actually Does Work .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`In-Place Container Step By Step
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Prepare the Container .
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`_
`_
`Implement Skeletal In-Place Container Interfaces _
`.
`.
`.
`Activate and Deactivate the Object
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`.
`Mix—a-Menu: Shaken, Not Stirred .
`,
`.
`.
`.
`.
`.
`.
`.
`NegotiateToolSpace.........,... ..... .
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`.
`.
`.
`_
`.
`
`.
`
`.
`
`.
`.
`.
`.
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`.
`_
`.
`
`.
`
`.
`.
`.
`.
`.
`.
`
`.
`
`.
`_.
`
`.
`
`.
`.
`
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`.
`.
`
`_
`
`.
`.
`
`.
`.
`
`.
`.
`.
`.
`_
`.
`.
`
`.
`.
`.
`
`.
`.
`.
`.