ebook img

The OS/2 Warp Toolkit for Software Developers PDF

244 Pages·1996·31.5 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview The OS/2 Warp Toolkit for Software Developers

-_. ® Explores debugging & 16/32-bit DLL operation • Explains inner workings of os/2 executable flles • Includes source 8[ object code & a tool for inspecting .OBJ & .LIB flles h¢+s/2VAR TOOEKT FORSOFTAR DEVEEOPERS Prentice Hall PTR Upper Saddle River, NJ 07458 Library of Congress Cataloging-in-Publication Data Viscuso, Maurice I. The OS/2 warp toolkit for software developers / Maurice J. ``Red" Viscuso . P. Cm. Includes index. ISBN 0-13-192428-1 1. OS/2 warp. 2. Operating systems (Computers) 3. Computer software--Development. I. Title. QA76.76.063V46 1996 005 . 4 ' 5--dc20 96-22437 GIP Editorial/production supervision: Dz.cz7zc Heck/cr Ko7iomfeczs Art Director: Jerry Voffcz Cover Designer.. Design Source Manufacturing Buyer: A/exz.I A. fJcydf Acquisitions Editor: Greg Doc#cfe Editorial Assistant: Lcczbc Bcr777cz# Editorial Liaison: Pczffz. Gz/cJ~rz.crz. © 1996 by Prentice Hall PTR Prentice-Hall, Inc. A Simon & Schuster Company Upper Saddle River, New Jersey 07458 The publisher offers discounts on this book when ordered in bulk quantities. For more information, contact; Corporate Sales Department Prentice Hall PTR One Lake Street Upper Saddle River, NJ 07458 Phone: 800-382-3419; Fax; 201-236-7141 e-mail: [email protected] All other products or services mentioned in this document are the trademarks or service marks of their respective companies or organizations. All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ISBN I-L]-L]EHEB-L PRENTICE-HALL INTERNATIONAL (UK) LIMITED, Lo73don PRENTICE-HALL OF AUSTRALIA PTY. LIMITED, Syd71Cy pRENTlcE-HALL CANADA INc., r07i073fo PRENTICE-HALL HISPANOAMERICANA, S.A., Mex!.co pRENTlcE-HALL OF INDIA pRlvATE LIMITED, IVcw Dc/fez. pRENTlcE-HALL OF JAPAN, INc., rokyo SIMON & ScHusTER AslA PTE. LTD., S!.#gapore EDITORA PRENTICE-HALL Do BRASIL, LTDA., R!.o dc Jcz#c!.ro Dedication Acknowledgments Preface 1 Object (.OBJ) Files 1.1 0urFirstsampleprogram ......... 1.2 HowDoweBuildlt? ........... 1.3 NowThatweBuiltlt,Whatlslt? ..... 1.4 Let'sTakeaLooklnsidesMP1.OBJ .... 1.5 WhatHaveweLeamed? .......... 1.6 Summary .................. 2 Library (.LIB) Files 2.1 Static Libraries versus ImportLibraries . . 2.2 HowareLibrariesused? .......... 2.3 HowareLibrariescreated? ........ 2.4 WhatelsecanLIB.EXEdoforyou? .... 2.5 ImportLibraries .............. 2.6 PuttingourFunctioninaDLL ....... 2.7 Linking to a DLL without an Import Library 2.8 WhatistheFormatofaLibraryFile? . . . 2.9 Summary .................. 3 Theos/2Linker 3.1 WhatdoesLINK386Actuallydo? ..... 3.2 Somelnterestingoptions ......... 3.3 Whichoptionsshouldweuse? ...... 3.4 How Does The Linker put It All Together? 3.5 Summary .................. 4 The Executable Module 4.1 NowThatweMadelt,Whatlslt? ...... 4.2 EXEHDR.EXE-TheMicroscope ...... 4.3 DynamicLinkLibraries ........... 4.4 Ordinals ................... 4.5 DLLTrickswithFWDSTAMp.EXE ..... 4.6 IsltReallyHappening? ........... 4.7 Summary ................... 5 A closerLookatEXEHDR 5.1 InsideourDLL ............... 5.2 TheobjectTable ............... 5.3 Exports .................... 5.4 RelocationandFixups ............ 5.5 WhocaresAboutAllThisDetail? ...... 5.6 Summary ................... 6 0ddsandEnds 6.1 Debugging .................. 6.2 WhattheLinkerDoestoHelp ........ 6.3 DownandDirtyDebugging ......... 6.4 0S/2anditsDLLs .............. 6.516-bitvs.32-bitDLLOperation ....... 6.6 Calling Between 16-bit code and 32-bit code 6.7 MARKEXE ................. 6.8 SurfingtheHeaderFiles ........... 6.9 Summary ................... 7 AFewLastwords 89 7.1 DECODE.EXE .......................... 89 7.2 NowGoandplay ........................ 104 Appendix Index Dedication This book is dedicated to my daughter Tina Marie who continues to be the inspiration for so many of the things that I do. Acknowledgments No book is ever done alone. There are many people who help out along the way and contribute to the finished product. This book is no different. The author has many people who helped immensely along the way. Thanks to my good friend and mentor Dr. Clovis L. Tondo of T&T Tech- Works for his expertise and guidance over the last few years. His encour- agement has never ceased. Thanks also to another great friend, Andrew Nathanson whose knowledge and expertise helped produce the makefiles. He also reviewed the manuscript and offered valuable suggestions. A special thanks to Allen Wynn of IBM, for providing the information on the Object Module Formats. What would I have done without Lunaea Hougland for her expert copy editing? She corrected my English, my spelling and my sentence structure and helped make the book readable. My managers at IBM, Sam Casto and Jim Roney tolerated any interference this work created with my normal assignments. I certainly can't forget Dr. Len Dorfman, Peter Dyson, Dick Conklin and Patricia MCFadden whose review and feedback helped to make this a better book. And of course, there is Greg Doench, Meg Cowen and the many other folks at Prentice Hall whose skills turned this entire project into a reality. Finally, a loving thanks to my wife Joan, and my daughter Tina for putting up with the long hours and not complaining too much about the amount of time I spent on the computer.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.