wideman-one 
Last edit: 05-03-17 Graham Wideman

Delphi

Delphi OLE and Drag and Drop: Comments on Books
Article created: 98-06-26
Major revs: 98-07-29

The following comments are intended to extend the material on OLE drag and drop found in various books, and are not meant as a devaluation of the authors' valiant works!

High Performance Delphi 3 Programming  (Several authors, the drag and drop section is by Jim Mischel)

It was JM's chapters in HPD3P that got me rolling on this project in the first place, so thanks for the head start!  However, there are several pieces of code that I now believe need revision:

Delphi Developer's Handbook (Cantu, Gooch, Lam, OLE/COM section by John Lam)

Inside OLE 2 (first and second editions)

It may be the bible of OLE, but it's at a level that's a tad too deep in OLE terminology and concepts to wade into if you've never seen OLE before. It's been several years since I bought the book, and now that I know a lot more about OLE/COM, Java and about O-O systems in general, I can go back and see what this book is talking about.   So, if you're tempted to start here, it might be better to pick a gentler introduction first. There's a heck of a lot of stuff here that you don't need to know if you are going to use Delphi.

On a finer point, I was a little unnerved to see a discussion of CoLockObjectExternal (needed for DropTarget) which amount to "no one really knows why, it has something to do with preventing the system from killing your COM object, and we're pretty sure it's a design flaw, but trust me, you have to use it". (Bear in mind that Kraig B's official job at MS was to explain COM.  The Second Edition does have a little more explanation.)    That, coupled with Jim M's extra AddRefs is what motivated the extra attention to the DropTarget create and destroy process in my example code.


Go to:  Drag and Drop Intro Page, or  wideman-one