Buy Used
Used - Good See details
$3.99 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
VB Shell Programming: Integrating Applications with the Windows Shell (Visual Basic)
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

VB Shell Programming: Integrating Applications with the Windows Shell (Visual Basic) [Paperback]

J.P. Hamilton (Author)
4.4 out of 5 stars  See all reviews (8 customer reviews)


Available from these sellers.


Formats

Amazon Price New from Used from
Paperback --  

Book Description

Visual Basic July 8, 2000

Visual Basic's outstanding set of resources for rapidly developing stand-alone applications doesn't include shell extensions for integrating those applications or their data files with the Windows shell. Typically, such extensions as customized context menu handlers, per instance icons (such as a data file icon that's based on the contents of the file), and customized property sheets are written in C++, and all of the available documentation focuses on using C++ for shell extensions.

But even C++ programmers find the task rough going, given the woefully inadequate state of the documentation. Very few programmers know that writing shell extensions is not tied to a single language or development environment, and that Visual Basic is an excellent tool for creating shell extensions that more closely tie an application to the Windows shell.

That, however, is precisely the focus of Visual Basic Shell Programming. It shows how to take advantage of shell services to develop shell extensions and it provides the basic documentation needed for accomplishing this. Each major type of shell extension gets attention, including:

  • Context menu handlers that can add items to the popup menu that appears when the user right clicks a file.
  • con handlers for displaying per instance icons that, like the standard Recycle Bin icon, vary depending on some condition
  • Property sheet pages, which appear when the user selects the Properties option from a file's context menu.
  • InfoTip handlers, which display tooltips, or "info" tips for a file object on a per instance basis.

In showing how to integrate applications with the Windows shell by building shell extensions, author J.P. Hamilton provides a concrete tutorial on COM programming with Visual Basic. And while developing their own shell extensions, readers get to learn advanced VB concepts and techniques such as:

  • Pointers. Since VB tends to hide pointers from the programmer, Hamilton shows how to take advantage of the undocumented VarPtr, StrPtr, and ObjPtr functions, as well as the Win32
  • RtlMoveMemory function.
  • Using class identifiers (CLSIDs) from Visual Basic.
  • VTable modification, which allows control of the HRESULT (or status code) returned by a call to a COM method.

Visual Basic Shell Programming ventures where none have gone before by giving readers both the know-how to develop shell extensions and an advanced treatment of COM programming with Visual Basic.


Customers Who Bought This Item Also Bought


Editorial Reviews

Amazon.com Review

Windows users take advantage of shell extensions on the desktop every single day, but understanding what they are and how to program with them can be tricky and, until now anyway, usually required the use of Visual C++. Filled with expert knowledge of the underlying Windows shell COM objects, Visual Basic Shell Programming is all that you need to write shell-enabled applications that look more professional, as well as rival the functionality of programs that are written in C++.

First and foremost, this efficiently packaged text is a reference to all of the COM objects and APIs that are needed to program with the Windows shell successfully. Each section is organized by topic, with an explanation of what kind of functionality you can add, and then all of the COM objects, methods, and constants that you'll need to use in VB, along with sample code. For many of the examples, a custom file extension (.rad) illustrates how to integrate this file into the desktop, and extend what it can do within the Windows desktop.

Reading this book is also an education in the features that the Windows shell actually offers. For example, you'll learn how to add dynamic, context-sensitive menus to desktop icons, and drag-and-drop processing and custom property sheets that pop up on the desktop.

Later sections turn to the Internet, with browser extensions, which can customize the look and feel of Internet Explorer (and File Explorer). One sample presents the code for a Web site crawler, which automatically downloads a group of files. Throughout, the book is careful to point out those features that are easy to do in VB and those that require advanced programming techniques. (Generally speaking, there's a lot of VB expertise on display here.) The author provides a custom COM type library for exposing all of the shell functionality to VB programmers. Of course, you can use this file to develop your own VB shell applications.

Overall, this book helps explain a rather difficult topic in Windows programming, and makes accessible for the very first time this exciting area of functionality to experienced VB programmers. Read Visual Basic Shell Programming to create applications that both are more professional looking and take full advantage of every available feature in today's Windows desktop. --Richard Dragan

Topics covered:

  • Introduction to Visual Basic and the Windows shell
  • COM basics (including type libraries, IUnknown, and IDispatch)
  • Introduction to shell extensions
  • Context menu handlers (static and dynamic)
  • Icon and property-sheet handlers
  • Drop handlers (and drag-and-drop processing)
  • Data handlers
  • Copy hook handlers
  • InfoTip handlers
  • Basics of namespace extensions
  • Pointer to identifier list (PIDL)
  • Browser extensions
  • Browser help objects
  • Band objects
  • Sample code for a Web site crawler
  • Docking Windows
  • VBShell (custom type library for letting VB programmers access shell objects)
  • Reference material on all Windows shell COM objects and APIs
  • Techniques for copying memory and using pointers within VB

From the Publisher

All code in this book was updated for Windows 2000 and will be included in reprints. It is also available directly from the O'Reilly Web Site.

Product Details

  • Paperback: 392 pages
  • Publisher: O'Reilly Media; 1 edition (July 8, 2000)
  • Language: English
  • ISBN-10: 1565926706
  • ISBN-13: 978-1565926707
  • Product Dimensions: 9.1 x 7 x 0.9 inches
  • Shipping Weight: 1.4 pounds
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (8 customer reviews)
  • Amazon Best Sellers Rank: #1,464,094 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

8 Reviews
5 star:
 (4)
4 star:
 (3)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (8 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

7 of 8 people found the following review helpful:
5.0 out of 5 stars Just what the doctor ordered, August 10, 2000
By 
Igor Shpak (Long Island, NY United States) - See all my reviews
(REAL NAME)   
Amazon Verified Purchase(What's this?)
This review is from: VB Shell Programming: Integrating Applications with the Windows Shell (Visual Basic) (Paperback)
As a Visual Basic developer, I always envied C++ developers who were able to do Namespace extensions, as well as other integrations with the Windows Shell. Well the wait is over, and now there is a book which explains it all. Never before there has been such a source of information for the Visual Basic developers. We were in the dark. I remember trying to implement the C++ code, and port it to Visual Basic, only to find one obstacle after another. This book clearly explains the steps and API's needed to perform this task. Using and enhancing Windows Shell can be a great supplement to the GUI programming.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


4 of 4 people found the following review helpful:
4.0 out of 5 stars Good Introduction to Shell Programming in VB, June 10, 2001
By A Customer
This review is from: VB Shell Programming: Integrating Applications with the Windows Shell (Visual Basic) (Paperback)
First off, if all what you want to do is to add an icon to the systray, go find _any_ Win32 API book or even search on the web. This book does not cover simple tricks like this. But if you want to write your own namespace extensions or property sheet handlers, read on.

Many people think VB and windows shell programming don't mix very well. Honestly, I was one of them. But after reading this great introduction, I figured I was wrong. Well, mostly wrong.

There are two issues that make shell programming hard in VB:

(1) As in most "advanced VB programming tasks", the first realization must be you _can't_ do it in pure VB. You need to import Win32 APIs and then fake you are writing your program in C. But that's a very old and well-solved problem, and in fact this book assumes you know how to do it: it shows the import statements without explaining how to get them. But that's fine, for I think most advanced VB programmers have already picked up this old trick.

(2) The windows shell is built heavily on COM, so must be the shell extensions. But this book is not about writing COM servers in VB... Apparently the author did not expect the readers to know COM before, so he offered a short chapter on COM basics that I find too short to be sufficient for the purpose of this book. For example, later on he started using jargons like "in-process COM servers" and "apartment threaded" (these are COM jargons) without explaining what they are. I tried to look up these terms in the index to quote the page number. They are absent---yet another proof of insufficient coverage of COM. I admit that shell extensions are in-process COM servers and so in most cases the readers are not expected to do anything else anyway, but this kind of treatment much weakens a reader's understanding of what he/she is doing.

And there are other problems that plague this almost excellent book:

(1) There is no separate treatment of what should the programmer do when a new shell extension comes out. As an example, icon overlay is not covered in this book. I think this is really the major reason I have to take half a star off: this book is more like "how I wrote those shell extensions" rather than "how you can write your own ones". For example, it does show many examples of how to turn a given IDL into more VB friendly, but not how can the programmer obtain the IDL of an interface that's not covered in the book. (OLE View won't answer all such prayers. Go check the platform SDK or, _cough_, wait for the second edition of the book to have a new chapter on that extension. :P)

(2) There is no coverage of debugging shell extensions. It's not as easy as one may expect, especially as VB will automatically re-register your COM servers when you execute your code while Explorer loads some registry entries only once...

Overall, this is a more than decent introduction to shell programming using VB. If you want to do some typical shell programming like having your own property sheet or namespace extensions, then this book is really good for the job and is worth every single penny. I would rather say it's 4.5 star, but I have to round down for the minor problems I mentioned.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3 of 3 people found the following review helpful:
5.0 out of 5 stars Everything I thought Visual Basic Couldn't Do..., August 14, 2000
This review is from: VB Shell Programming: Integrating Applications with the Windows Shell (Visual Basic) (Paperback)
Working with Visual Basic you stay away from doing certain things. Namespace Extensions was one of those things for me. Then I found this book. I have learned more about how Windows and Viusal Basic works from reading this book than any other thing I have ever done. Way to go J. P. Hamilton! Hats off to you. This is a must read book, even if you never have the need to work with the shell.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews






Only search this product's reviews



Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   
Related forums


Listmania!


Create a Listmania! list

So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject