Résumé
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.
Preface
I. Introduction to the Shell and the Basics of COM
1. Introduction
COM and the Shell
Programming for the Shell
Kinds of Shell Extensions
Conclusion
2. COM Basics
What Is COM?
Interfaces
Classes
Type Libraries
IUnknown
IDispatch
Conclusion
3. Shell Extensions
Folders and File Objects
Shell Extensions
Registry Settings
The .rad File
The Shell Extension Project
Restarting the Shell
When the Shell Crashes
II. Shell Extensions
4. Context Menu Handlers
Static Context Menus
Static Context Menus in IE 5.0
Dynamic Context Menus
Context Menu Handler Interfaces
Creating a Context Menu Handler
5. Icon Handlers
How Icon Handlers Work
Icon Handler Interfaces
Creating an Icon Handler
6. Property Sheet Handlers
How Property Sheet Handlers Work
Property Sheet Handler Interface
Creating a Property Sheet
Handler
Registering the Property Sheet
Handler
7. Drop Handlers
How Drop Handlers Work
Drop Handler Interfaces
Creating a Drop Handler
Registering the Drop Handler
8. Data Handlers
How Data Handlers Work
Data Handler Interfaces
Creating a Data Handler
Adding Additional Formats
9. Copy Hook Handlers
How Copy Hook Handlers Work
Copy Hook Handler Interface:
ICopyHook
Implementing ICopyHook
Registering Copy Hook Handlers
Testing the Handler
10. InfoTip Handler
How InfoTip Handlers Work
InfoTip Interfaces
The Project
III. Namespace Extensions
11. Namespace Extensions
Namespace Fundamentals
Explorer Architecture
The PIDL
Namespace Interfaces
Creating the Namespace Extension
The PIDL Manager
Registering DemoSpace
Practical Coding Examples
IV. Browser Extensions
12. Browser Extensions
Browser Helper Objects
Browser Extensions
13. Band Objects
How Band Objects Work
Band Object Interfaces
The Project: FileSpider
Registry
Tool Bands
14. Docking Windows
How Docking Windows Work
Docking Window Interfaces
The Project
Registration
V. Appendixes
A. VBShell Library Listing
B. Pointers
Index
L'auteur - J.P Hamilton
J.P. Hamilton is a software engineer who lives and works
in Houston, Texas,
perhaps the largest underrated city in the known universe.
At the age of eight, a
serious addiction to Space Invaders and a lack of funds led
him to his first PC, a
6502-based beast built by Ohio Scientific. He's been
programming ever since. He has
been dabbling in the black art of COM programming for
several years and uses both
languages: C++ and Visual Basic. From time to time he
leaves the realm of
programming to pursue his other interests: skydiving,
running marathons, yoga, and
drinking coffee.
Caractéristiques techniques
PAPIER | |
Éditeur(s) | O'Reilly |
Auteur(s) | J.P Hamilton |
Parution | 15/08/2000 |
Nb. de pages | 392 |
Couverture | Broché |
Intérieur | Noir et Blanc |
EAN13 | 9781565926707 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse