Skip to Content
VB Shell Programming
book

VB Shell Programming

by J.P. Hamilton
July 2000
Intermediate to advanced
392 pages
10h 19m
English
O'Reilly Media, Inc.
Content preview from VB Shell Programming

The Project

The project for this chapter is fairly straightforward. We are going to start with the browser helper object that we built in Chapter 12 and give it a user interface. Not too creative, but that’s not really the point. The point is to show you how you can take a simple component like a BHO and give it a user interface. Coming up with a creative way to use this knowledge will be your job. Now, how’s that for passing the buck? You might be saying to yourself, “The component in Chapter 12 already has a user interface.” True, but browser extensions (as opposed to BHOs) are for IE 5.0 and up. A BHO with a docking window is backwards compatible to IE 4.0.

Primary Component

Let’s start with the IObjectWithSite::SetSite method of the component we built in Example 12.2. We’ll add the code necessary for the docking window and then discuss the details. We only need to add a few new lines of code, which appear in boldface in Example 14.1.

Example 14-1. SetSite in Primary Object

Private Const IID_IShellBrowser = _ "{000214e2-0000-0000-c000-000000000046}" Private Const IID_IDockingWindowFrame = _ "{47d2657a-7b27-11d0-8ca9-00a0c92dbfe8}" Private szToolbar As String Private Sub Class_Initialize( ) szToolbar = "IEDockingWindow" End Sub Private Sub IObjectWithSite_SetSite(ByVal pSite As IUnknownVB) If ObjPtr(pSite) = 0 Then CopyMemory m_ie, 0&, 4 Exit Sub End If Set m_pUnkSite = pSite 'Save the site pointer for GetSite Dim pServiceProvider As IServiceProvider Set pServiceProvider ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

VBScript in a Nutshell

VBScript in a Nutshell

Matt Childs, Paul Lomax, Ron Petrusha
VB.NET Language in a Nutshell, Second Edition

VB.NET Language in a Nutshell, Second Edition

Steven Roman PhD, Ron Petrusha, Paul Lomax
Visual C++® 6 Unleashed

Visual C++® 6 Unleashed

Mickey Williams, David Bennett

Publisher Resources

ISBN: 1565926706Catalog PageErrata