`6,008,806
`[11] Patent Number:
`(15
`United States Patent
`Nakajimaet al.
`[45] Date of Patent:
`*Dec. 28, 1999
`
`
`[54] SHELL EXTENSIONS FOR AN OPERATING
`SYSTEM
`
`[75]
`
`Inventors: Satoshi Nakajima; George H.Pitt, IIL,
`both of Redmond; Joseph D. Belfiore,
`Seattle; Christopher J. Guzak,
`°
`Kirkland; Chee H. Chew, Redmond,all
`of Wash.
`
`[73] Assignee: Microsoft Corporation, Redmond,
`Wash.
`This patent is subject to a terminal dis-
`claimer.
`
`[*] Notice:
`
`[21] Appl. No.: 09/179,240
`
`[22]
`
`Tiled:
`
`Oct. 26, 1998
`
`Related U.S. Application Data
`a.
`.
`[63] Continuation of application No. 08/355,410, Dec. 13, 1994,
`Pat. No. 5,831,606.
`“ne
`Tint, C08 ec eeecssssecessssecsscsecessseesessnnee GO6F 15/00
`[51]
`[52] US. Ch cece 345/335; 709/303; 709/304
`[58] Field of Search ..c...cscccscscssseeesseeee 345/326, 335;
`709/107, 301, 302, 303, 304
`
`[56]
`
`References Cited
`U.S. PATENT DOCUMENTS
`
`10/1996 Khalidi et al. oe 707/200
`5,561,799
`11/1996 Fowleretal. ......
`5,572,709
`395/500.48
`5,581,760 12/1996 Atkinson et al. cies 395/702
`5,598,524
`1/1997 Johnston, Ir. et al... 345/348
`
`Primary Examiner—Ba Huyoh
`5
`Attorney, Agent, or Firm—Christensen, O’Connor, Johnson
`& Kindness PLLC
`
`[57]
`ABSTRACT
`An operating system provides extensions through which
`application developers may extend the capabilities of a shell
`of the operating system. For example, application develop-
`ers may add menu items to context menus for objects that are
`visible within an integrated system name space. In addition,
`developers may add property sheet pages for such objects.
`Application developers also have the option of providing
`per-instance iconsfor each instance of an object. Application
`developers may provide data object extension handlers for
`customizing data sources on a per-object class basis and may
`provide drop target extension handlers on a per-object class
`:
`*
`:
`basis to customize drop target behavior. Developers may
`additionally provide copy-hook handlers to regulate file
`system operations on objects. Developers may also extend
`the functionality provided by the shell of the operating
`system by adding their own custom name spaces to the
`integrated system name space. The mechanism provided by
`the operating system to add such a name space is polymor-
`phic and transparent to users.
`
`5,504,892
`
`4/1996 Atsatt et alo wee eeereeees 707/103
`
`2 Claims, 10 Drawing Sheets
`
`BEGIN
`
`30
`
`32
`
`34
`
`
`
`
`
`
`
`
`PROVIDE OBJECTS AND SHELL
`EXTENSION HANDLERS
`
`REGISTER SHELL EXTENSION
`HANDLERSIN REGISTRY
`
`USE SHELL EXTENSION
`HANDLERS
`
`RETURN
`
`Google Exhibit 1047
`Google Exhibit 1047
`Google v. Valtrus
`Google v. Valtrus
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 1 of 10
`
`6,008,806
`
`OL
`
`MYOMIAN
`
`TIVIAALNI
`
`AISnow
`
`9T
`
`PL
`
`cL
`
`b
`
`cZZ
`
`AVIdSIG
`
`OFCHAGYVOIKIN
`
`AYVANOIAS
`
`IOVAOLS
`
`AYOWAW
`
`AYLISIOAA
`
`81
`
`9
`
`8c
`
`‘T'S
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 2 of 10
`
`6,008,806
`
`
`
`
`
`SdaqdAGANIAZAG-daddWALSTOWY
`
`
`
`SdydATVNOILLICGVANVYALSIDAL
`
`
`
`
`
`YOdSONTALSWALINNAWAVIdSIG
`
`
`
`NNAWIXAZLINOONISdayda
`
`
`
`
`
`NOLLOATASFASNFAIFOAY
`
`9€
`
`8
`
`OF
`
`cr
`
`bY
`
`
`
`TIIHSANYSLOI{/q@OJdGIAONd
`
`
`
`SUTIGNVHNOISNALXI
`
`
`
`
`
`NOISNALXdATIAHSYALSIOAN
`
`AULISTOWANISUTTIGNVH
`
`
`
`NOISN4ALIXTIFHSASN
`
`SYTIGNVH
`
`NaNnlaa
`
`‘e°B1]
`
`
`
`C4aLIATASWOWAHAAAANOANI
`
`
`
`WillNNIW
`
`‘TSI
`
`NIOAL
`
`NIDA
`
`
`
`
`
`
`
`
`
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 3 of 10
`
`6,008,806
`
`NIDA
`
`LoaglgqoNOGaNOIID
`
`
`
`NOLINISNOW
`
`
`
`TITAUNVHNNIW
`
`
`
`OLYIINIOdNIVIGO
`
`NNAWIXALINOOI
`
`SHyqAUNV
`
`
`
`(onm)“SSH
`
`AIOVIAAINI
`
`
`
`SHyqAYOdSWALT
`
`SWAILINNAWAaVOLNOLIONNQNNIWLXILINOIANINO
`
`WATANVHJOJONVISNILVAD
`
`TIVO
`
`
`WISNLVHLIOVSSAWFAIIOIA
`LITTHLIMNOLLVINISIIdIN
`IINIEXATTIHSIAOdNSVUNV
`
`
`NOILLONNGA()FZIIVIINITIVO
`LXDLINOOJO‘ATSSWIDLID
`NIDA
`
`CGaIOATASWOTTHAAIAOANI
`NNWHIIMNAWAVTdSIG
`
`NNAWEXZINOOAALSIOIyY
`
`SHyaAAdvATIVOINVNAG
`
`NOIWOITASWASNFATFOAA
`
`9S
`
`8S
`
`09
`
`9
`
`r9
`
`99
`
`UTTIGNVH
`
`
`
`WALIDNIW
`
`NUNLAL
`
`
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 4 of 10
`
`6,008,806
`
`UF]
`
`oO]puss
`
`a]910q
`
`ajpeID 9°51]
`
`ueppiHLJAjuo-poay[_]
`wieysds[_]enlysiy[FI
`
`
`S3JAqS99PLLGELL79215
`¥6/L2/10=:PEssed5yv6/L7/10=peBunyd{so]4sD]
`
`
`
`
`uoypolddy:adA]
`SMOPUIM=:UOIJD907
`
`SMOPUIM\:D:UjOd
`podeyuisAa
`
`‘OWDNSO”dSW
`
`UOISIOA|[DIBUED
`JO}salpedold
`
`saynquny
`
`pds
`
`cL
`
`OZ
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 5 of 10
`
`6,008,806
`
`NIOA
`
`
`
`dOCISSVTODNIVIGO
`
`
`
`LAFHSALWACOUd
`
`YITGNVH
`
`
`
`IOJONVISNIILVAAD
`
`YOdASVUNVYITGNVH
`
`LINILXATTAHSI
`
`
`
`OAZITVILINITIVO
`
`
`
`AIOVINALININIVLIO
`
`OLYALNIOd
`
`
`
`IXILATHSdOUdTIAHSIT
`
`
`
`()S1DVddaVTIVO
`
`ddvOLNOWINNA
`
`
`
`
`
`SIOVdLAINSALWAdOd
`
`
`
`ALWAdOUdWALSIOAA
`
`
`
`MTIGNVHLIFHS
`
`
`
`IXALINODAVITdSIG
`
`HIIMNNIWNNAW
`
`GANVWWOOD«SAILNAdOd,
`
`
`
`WISNFATIIAN
`
`IONOILDATAS
`
`GNVWWOOD«SALLAIdOdd.
`
`
`
`ALWAdOUdAIOANI
`
`
`
`dVOLYWATANVHLAIHS
`
`
`
`
`
`SAOVdLAAHSALMIAdOld
`
`NUNIT
`
`‘651
`
`NaNLLIa
`
`‘Z'S1
`
`
`
`
`
`
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 6 of 10
`
`6,008,806
`
`00r
`
`NIDA
`
`
`
`
`
`YATAUNVHANOOIdOATISSVIOLAD
`
`COL96
`
`NOOTIdOJONVISNINVLLVIIDWidWAILSIOIN
`
`
`
`WOINSVGNVWATAUNVHNOJIFIONVISNI
`
`NOOIUNV
`
`POL
`
`
`
`90YITANVHDNISN
`
`
`
`NOILIONNA()GVOTTIVO
`
`86
`
`NOOIAVIdSIG
`
`
`
`
`
`OLYIINIOdAIVATAININIVIGO
`
`
`
`NOLLINNA()NODILIVALXATIVD
`
`NUNLAY
`
`Comm)EPH
`
`NOOLLDVALXAI
`
`80L
`
`OLL
`
`NOTIONNI
`
`
`
`()NOLLVIOINOOLLIDTIVOeeOLS14
`
`FTUWALSISYAdIYdTIGNVH
`
`
`
`
`
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 7 of 10
`
`6,008,806
`
`TATAUNVH
`
`NOISNALXJLOIld@OVLVGMALSIOIN
`
`
`
`
`
`WITGNVHNOOHAdODAALSIOIaA
`
`OcL
`
`dOUdGNVOVAALVILINI
`
`NOILVaAdO
`
`ccL
`
`
`
`‘KdOOOLLSINOANFAIZOIN
`
`
`
`ZLATAICWOJNVNAY‘JAOW
`
`
`
`LOaldqOMALNINdYOWIGTOA
`
`NIOA
`
`OLNIVIVdIOVaLxdOLYITAUNVH
`
`
`MOOHAdOOAOINOIIONNA
`
`
`
`LVWaOdGiwyIsid
`
`YATAUNVH
`
`
`
`dOUdAGNVOVAALTIGWOD
`
`NOILVaAdO
`
`
`
`ANIVASNYNLAANOLTIONNA
`
`
`
`MOHSddIDdAdTTIHSGNV
`
`dqOdOL
`
`NUNLIa
`
`‘EL81]
`
`NAPLLAT
`
`TL'S1
`
`
`
`
`
`NOISNILXLOd/dOVLIVdAsn
`
`()MOVATTVIAdODTIVI
`
`OIL
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 8 of 10
`
`6,008,806
`
`
`
`
`
`
`
`TOVdSAWVNCAGNALXASSADIV
`
`NYNLAL
`
`‘OLS14
`
`
`
`CNVAVIdSIdOLYATGNVHTIVO
`
`NIOA
`
`YTTIGNVH
`
`NOISNALXATALOTIXYALSIOAA
`
`
`
`YITANVHTIVO‘dOYdNIHM
`
`crL
`
`
`
`YAITANVHNOISNALXA
`
`dOUdGNVOWNALVILINI
`
`NOILVaAdO
`
`
`
`
`
`LIDAVLdOAdWALSIOIA
`
`8cL
`
`O€T
`
`NIDA
`
`NUNLIa
`
`‘PL81]
`
`
`
`
`
`
`
`
`
`
`
`U.S. Patent
`
`Dec. 28, 1999
`
`Sheet 9 of 10
`
`6,008,806
`
`PEL
`
`
`
`WVS1:6076/S0/10
`
`1ap|o4
`
`
`
`WdZL:LO€6/80/tL
`
`Jeplo4
`
`Japlo4
`
`JOplo4
`
`laplo4
`
`
`
`WV£0:60€6/Z0/ZL
`
`
`
`WVSP:0L76/11/10
`
`1ap|o4
`
`1eplo4
`
`
`
`Wd0Z:e076/81/10
`
`Jap|o4
`
`
`
`WVLE:0L6/20/€0
`
`Japlo4
`
`
`
`sjoololdsys]
`
` Buysoda104(_|199x3(—]eMesndwuod[~]peuponleam[eas[won
`
`Pilly
`
`WV?70:LL76/80/20
`
`WV9P:0L76/E1/10
`
`
`
`
`
`UOIDSIUIWPYSIA]
`
`GIR)WIVOTIVAI\ATS\\E-)
`
`CDSDINDSd\X3aAd\\EB)
`CD)PUS,CqUoRy-Ca)Addo4¢GS-4)
`
`GH)910}SOHBS)
`
`
`SOIJOSIN__]
`
`MXDIZLOL_]
`qndswif_]
`
`OWS]
`
`—SjOO]MOIA
`
`JejndwodAWfe
`
`
`
`JSUu_"_JONUODCe
`
`
`
`JOp]OJSIOJUd[_}--“
`IOMIONAWag1
`
`OVE
`
`
`
`U.S. Patent
`
`Dee, 28, 1999
`
`Sheet 10 of 10
`
`6,008,806
`
`NIOId
`
`NIOWd
`
`
`
`YOWidTOdSNadOWISN
`
`G4IdNAILXdNIYACTOAENS
`
`
`
`dOVdSJINVN
`
`IOJONVISNINV4ILVAYD
`
`
`
`dOdONIISVNOISNALXA
`
`UACTOALSISYddI
`
`FL
`
`LOIUGOMIIAILVIND
`
`9ST
`
`
`
`NOLIONNA()FZITVILINITTVOPN
`
`SPL
`
`MOCNIMMdIAJLVAID8ST
`
`OLYZLINIOdNIVLIOOST
`
`wadTOATTAHSI
`
`NOLIVWHOANIAVIdSIG
`
`MOGANIMNI
`
`
`
`NISNOILONNATIVO
`
`GiddinSVYACTOATTAHSI
`
`cSt
`
`NUNLIA
`
`‘ST'814
`
`NUNIT
`
`LES1
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`6,008,806
`
`1
`SHELL EXTENSIONS FOR AN OPERATING
`SYSTEM
`
`CROSS-REFERENCE TO RELATED
`INVENTIONS
`
`This is a continuation of U.S. Ser. No. 08/355,410 US.
`Pat. No. 5,831,606 Dec. 13, 1994.
`
`FIELD OF THE INVENTION
`
`The present invention relates generally to data processing
`systems and, more particularly, to shell extensions for an
`operating system.
`
`BACKGROUND OF TIE INVENTION
`
`Conventional operating systems include shells that pro-
`vide user interfaces. Unfortunately, such shells are often
`limited in their capabilities and in the flexibility of options
`that they provide to an applications developer. For example,
`such conventional operating systems often provide shells
`that define context menus foreachfile system object. The list
`of menu items and associated operations provided bythe
`shells for the context menusare often limited. Moreover, the
`menu items cannot be changed by applications.
`Conventional shells are often additionally limited in that
`they predefine property sheet pages for file system objects.
`The property sheet pages are user interface elements that
`display property values for the associated file system objects
`and typically allow a user to change some of the displayed
`property values. Each property sheet page is associated with
`a subset of related properties for the objects.
`The shells of conventional operating systems are further
`limited in that they provide predefined icons only forfile
`types or objects classes. These shells do not facilitate the use
`of per-instance icons that are associated with each instance
`of an objector file. The shells of the conventional operating
`systems are further limited in that they only provide access
`to objects in the file system name spaces and provide no easy
`mechanism for integrating additional name spaces into the
`system.
`Conventional operating systems are also limited as to
`drag-and-drop operations. In particular, applications have no
`ability to customize the functionality of a drop based upon
`a file object type in conventional systems. Further, these
`conventional operating systems provide no ability to cus-
`tomize source objects in drag-and-drop operations.
`SUMMARYOF THE INVENTION
`
`The above-described difficulties encountered by shells of
`conventional operating systems are overcomebythe present
`invention. In accordance with a first aspect of the present
`invention, a methodis practiced in a data processing system
`that includes a video display and an object that has an
`associated context menu for specifying operations that may
`be performed relative to the object. The data processing
`system also includes an operating system with a shell that
`specifics predefined menuitemsin the context menu. In this
`method, a database of entries holding configuration infor-
`mation is provided within the data processing system. Menu
`itemsthat are not predefined by the shell are registered in the
`database so that the menu items are included in the context
`menu. Each entry that is registered in this fashion includes
`an identification of code that is to be executed when the
`
`menu item of the object is selected by a user.
`In accordance with a further aspect of the present
`invention, configuration information about a context menu
`
`10
`
`15
`
`25
`
`30
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`2
`handler is registered in database configuration information
`in a data processing system. A user makes a request and, in
`response to the request, the database is accessed to obtain
`configuration information about the context menu handler.
`The context menu handler is invoked to add menu items to
`
`a context menuof an object. A shell of an operating system
`providesat lcast onc menuitem for the context menu, but the
`context menu handler is used to add at least one additional
`menu item to the context menu for the object.
`In accordance with an additional aspect of the present
`invention, a database of registration information is stored in
`a memory meansin a data processing system. A represen-
`tation of a per-instance icon for a file is also stored in the
`memory means. The representation of the per-instance icon
`is registered in the database of registration information along
`with an icon handler. The icon handler is used to find the
`representation of the per-instance icon. A request to display
`the per-instance icon is received and,
`in response,
`the
`database is accessed to locate the icon handler. The icon
`handler then provides the per-instance icon to the operating
`system, which displays the per-instance icon on the video
`display.
`In accordance with another aspect of the present
`invention, a database of registration information is stored in
`amemorymeansof a data processing system. An objectthat
`has associated properties is provided within the data pro-
`cessing system. The data processing system includes a
`processing meansthat runs an operating system with a shell.
`The shell of the operating system provides at least one
`property sheet page for the object. A property sheet handler
`is registered in the database. The property sheet handler adds
`additional property sheet pages for the object. When a
`request to add at least one property sheet page for the object
`is received, the property sheet handler is used to add atleast
`one property sheet page for the object.
`In accordance with yet another aspect of the present
`invention, a data processing system includes a memory
`means, a video display and a processing means. The memory
`means holds an object and an operating system that includes
`a shell. The memory meansalso holds a registry for holding
`registration information. The registry holdsat least one shell
`extension handler for extending capabilities of the shell of
`the operating system. The data processing system further
`includes a processing means for
`running the operating
`system and the shell extension handler. The shell extension
`handler may be a number of different types of handlers,
`including a context menu handler, an icon handler, a prop-
`erty sheet handler or a shell name space extension handler.
`In accordance with another aspect of the present
`invention, a methodis practiced in a data processing system
`that has a video display and an operating system that
`includesa file system for performing file system operations
`on file system objects. In this method, a copy-hook handler
`is provided to indicate whether a file system opcration
`should be performed on a selected file system object. In
`response to a request
`to perform a specified file system
`operation on the selected file system object, the copy-hook
`handler is called to generate indication of whether the
`specified file system operation should be performed on the
`selected file system object. The indication that is generated
`by the copy-hook handler is used to determine whether to
`perform the specified file system operation on the selected
`file system object.
`In accordance with a further aspect of the present
`invention, a video display displays a representation of a
`source object and a representation of a target object for a
`
`
`
`6,008,806
`
`3
`drag-and-drop operation. A data object extension handler is
`provided to customize the source object
`to determine a
`format for a data that is to transferred when a drag-and-drop
`operation is performed on the source object in response to a
`user using an input device. A drag-and-drop operation is
`initiated in response to the user using the input device. This
`drag-and-drop operation drags the representation of the
`source object to be positioned over the representation of the
`target object. The data object extension handleris invoked to
`determine the format for the data that is to be transferred
`
`from the source object in the drag-and-drop operation. The
`representation of the source object is dropped on the repre-
`sentation ofthe target object in responseto the user using the
`input device to complete the drag-and-drop operation.
`In accordance with yet another aspect of the present
`invention, a drop target extension handler is provided for
`customizing behavior of a target object when a drop occurs
`on the target object. The drag-and-drop operation is initiated
`on the source object in response to a user using an input
`device. In particular, the representation of the source object
`is dragged ta be positioned over the representation of the
`target object. When a user drops the representation of the
`source object on the representation of the target object, the
`drop target extension handler is invoked to determine the
`behavior of the target object in response to the drop.
`In accordance with an aspect of the present invention, a
`method is performed on a data processing system that has an
`operating system and classes of objects. A shell extension
`handleris provided for one of the classes of objects to extend
`the functionality of the shell relative to that class of objects.
`The shell extension handler is independentof the operating
`system and maybe provided, for instance, by an application
`program. The shell extension handler is invoked to extend
`the functionality of the shell for an object in the class of
`objects for which the shell extension handler is provided.
`In accordance with an additional aspect of the present
`invention, a method is practiced in a data processing system
`that has a video display and an operating system. The
`operating system includes a name space mechanism for
`providing a name space of objects, including file system
`objects. ‘he operating system also includes a name space
`viewer for viewing objects in the name space on the video
`display. In this method, a name space extension is provided
`by an application program to add non-file system objects to
`the name space. The name space extension is used to add
`these non-file system objects to the name space and the name
`space vieweris then used to viewat least one of the non-file
`system objects that have been added by the name space
`extension.
`
`BRIEF DESCRIPTION OF THE DRAWINGS
`
`The foregoing aspects and many of the attendant advan-
`tages of this invention will become morereadily appreciated
`as the same becomesbetter understood byreference to the
`following detailed description, when taken in conjunction
`with the accompanying drawings, wherein:
`FIG. 1 is a block diagram ofa data processing system that
`is suitable for practicing a preferred embodiment of the
`present invention;
`TIG. 2 is a flow chart that provides an overview of the
`steps that are performed to extend the functionality of an
`operating system shell
`in accordance with the preferred
`cmbodiment of the present invention;
`FIG. 3 is a flow chart of the steps that are performed to add
`verbs to a context menu in accordance with the preferred
`embodiment of the present invention;
`
`10
`
`15
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`4
`FIG. 4 is a flow chart showing the steps that are performed
`to add dynamic verbs to a context menu in accordance with
`the preferred embodiment of the present invention;
`FIG. 5 is a flow chart showingthe steps that are performed
`to dynamically add verbs to a context menu in accordance
`with the preferred embodiment of the present invention;
`FIG. 6 depicts illustrative property sheets for an object;
`FIG. 7 is a flow chart showing the steps that are performed
`to add additional property sheet pages for an object;
`FIG. 8 is an example of a menu that has a command for
`adding property sheets in accordance with the preferred
`embodiment of the present invention;
`FIG. 9 is a flow chart illustrating in more detail how
`property sheets are added for an object in accordance with
`the preferred embodiment of the present invention;
`FIG. 10 is a flow chart showing the steps that are
`performed to use per-instance icons for an instance of an
`object in accordance with the preferred embodimentof the
`present invention;
`FIG. 11 is a flow chart showing in more detail the steps
`that are performed to register a per-instance icon handler in
`the preferred embodiment of the present invention;
`FIG. 12 is a flow chart illustrating the steps that are
`performedto use a copy hook handler in accordance with the
`preferred embodimentof the present invention;
`FIG. 13 is a flow chart illustrating the steps that are
`performed to utilize a data object extension handler in
`accordance with the preferred embodiment of the present
`invention;
`FIG. 14 is a flow chart illustrating the steps that are
`performed to use a drop target extension handler in accor-
`dance with the preferred embodiment of the present inven-
`tion;
`FIG. 15 is an example of an explorer window used in the
`preferred embodiment of the present invention;
`FIG. 16 is a flow chart showing the steps that are
`performed to add additional name spaces to the explorer
`name space in the preferred embodiment of the present
`invention;
`FIG. 17 is a flow chart of the steps that are performed to
`add a shell folder object to the explorer name space; and
`FIG. 18 is a flow chart showing the steps that are
`performed to display the contents of objects in a newly
`added name space in the preferred embodiment of the
`present invention.
`DETAILED DESCRIPTION OF THE
`PREFERRED EMBODIMENT
`
`invention
`The preferred embodiment of the present
`extends the capabilities provided by a shell of an operating
`system to allow an application developer to customize
`context menus, add property sheet pages for objects and
`provide per-instance icons for objects. Further, the preferred
`embodimentof the present invention facilitates the customi-
`zation of drop behavior and the customization of source
`objects in drag-and-drop operations on a per-object type
`basis. A copy-hook handler is provided to enable an appli-
`cation to grant or withhold approval of copy, delete, move or
`rename commands on objects. In addition, the preferred
`embodimentof the present invention facilitates the addition
`of new name spaces to a name space that is visible through
`a browsing system-provided tool (knownasthe “explorer”).
`These shell extensions allow developers to customize to
`better suit the needs of their users.
`
`
`
`6,008,806
`
`5
`The preferred embodiment of the present invention is
`practiced in an object-oriented environmentthat supports the
`“MICROSOFT”OLE2.01 protocol developed by Microsoft
`Corporation of Redmond, Wash.In order to fully understand
`the preferred embodiment of the present
`invention, it is
`helpful
`to review some of the fundamental concepts
`cmployed within “MICROSOFT” OLE2.01.
`An “object class”is the definition of both a data structure
`and functions that manipulate the data structure. An “object”
`is an instance of an object class. A related “MICROSOFT”
`OLE 2.01 concept is that of an “interface.” An interface is
`a group of semantically-related functions that are organized
`into a named unit. The name of the unit is the identifier of
`the interface. Interfaces have no instantiation in that the
`interface does not include code for implementing the func-
`tions that are identified in the interface; rather, the interface
`specifies a set of signatures for functions. “Instantiation”
`refers to the process of creating in-memory structures that
`represent an object so that the operations can be invoked on
`the object. When an object “supports” an interface,
`the
`object provides code for the function specified by the
`interface. Ilence, an object
`that supports an interface is
`responsible for providing the code for implementing the
`functions of the interface. The code that is provided by the
`object must comply with the signatures specified by the
`interface.
`
`The “MICROSOFT” OLE 2.01 protocol also provides
`“monikers”. A moniker is a composite name for an object
`that
`includes a pointer to the object. More formally, a
`moniker is an object that supports the predefined IMoniker
`interface. The [Moniker interface includes a function for
`binding the moniker to the object to which the pointer of the
`moniker points. Binding causes an object to be placed in a
`running state so that the services supplied by the object may
`be invoked.
`
`The shell extensions are implemented as shell extension
`dynamiclink libraries (DLLs). The shell extension DLLsare
`implemented by applications and constitute instances of
`interfaces. These shell extension DLLs are called when
`
`needed to extend the functionality of the shell as required by
`the application. The preferred embodiment of the present
`invention provides context menu handlers, icon handlers,
`property sheet handlers, copy-hook handlers, name space
`extension handlers, data object extension handlers, and drop
`target extension handlers. Each of these handlers will be
`described in more detail below.
`
`FIG. 1 is a block diagram of a computer system 10 that is
`suitable for practicing the preferred embodiment of the
`present invention. ‘he computer system 10 includes a cen-
`tral processing unit (CPU) 12 that is connected to a number
`of input/output devices, including mouse 14, keyboard 22
`and video display 24. The computer system 10 also includes
`a network interface 16 for interfacing the computer system
`10 with a nctwork. Mcmory 18 and sccondary storage 20
`store data and code. The memory 18 holds a copy of an
`operating system 26 that includes a registry 28 for holding
`configuration information.
`The registry 28 is organized as a hierarchically structured
`tree and is roughly analogousto the registry provided bythe
`“MICROSOFT” WINDOWSNT operating system. Each
`node of the tree is identified by a key name composed of
`ASCII characters. Keys may contain other keys, known as
`subkeys. The registry has a predefined root key called
`HKEY_CLASSES_ROOT. At the same level of the hier-
`archy are three predefined keys: HKEY_LOCAL_
`MACHINE, HKEY_CURRENT_CONFIG and HKEY_
`
`10
`
`15
`
`30
`
`35
`
`40
`
`50
`
`55
`
`60
`
`65
`
`6
`USER. Each of these predefined keys acts as a root of a
`separate subtree in the registry. The subtree associated with
`HKEY_LOCAL_MACHINE holds non-user specific
`information about
`the computer system. The HKEY_
`CURRENT_CONHIG key serves as the root of a subtree
`that holds non-user specific configuration information that
`pertains to hardware. Lastly, the HKEY_USERkeyis at the
`root of a subtree that holds user specific configuration
`information. The registry 28 is used by numerous
`applications, such as will be described below.
`FIG. 2 is a flowchart that provides an overview of the
`steps that arc performed to facilitate the shell cxtcnsions
`within the preferred embodiment of the present invention.
`Initially, objects on which the shell extensions operate and
`shell extension handlers must be provided within the
`memory 18 of the computer system 10. The shell extension
`handlers are then registered within the registry 28 (step 32)
`so that the computer system 10 is aware of the extension
`handlers and may utilize them. These shell extension han-
`dlers are then used to provide the desired shell extensions
`(step 34). The shell extensions extend the functionality
`provided by the operating system to aid developers of
`applications.
`The features of the shell extensions may be implemented
`by performing the steps shownin FIG. 2. In step 32, the shell
`extension handlcrs must be registered in the registry 28. Sct
`forth below is an example of the formatof the registry 28 for
`a word processor application to support these features.
`
`KR1:
`.doc = AWordProcessor
`2: AWordProcessor = A Word Processor
`3:
`shell = open print preview
`4:
`open
`5:
`command = c:awordaword.exe %1
`6:
`7:
`command = c:awordaword.exe /p %1
`8:
`printTo
`9:
`command = c:awordaword.exe /pt %1%2%3
`10:
`preview = Pre&view
`11:
`command = c:Awordaword.exe /r %1
`12:
`shellex
`13:
`ContextMenuHandlers = ExtraMenu
`14:
`ExtraMenu = {00000000-1111-2222-3333-00000000000001}
`15:
`PropertyShectHandlers = SummaryInfo
`lo:
`Summarylnfo = {00000000-1111-2222-3333-
`00000000000002}
`17:
`IconHandler = {00000000-1111-2222-3333-00000000000003}
`18: DefaultIcon = %1
`
`This example portion of the registry will be discussed in
`more detail below when focusing on the particular types of
`extensions.
`
`The preferred embodiment allows a developer to custom-
`ize context menus for objects by specifying customized
`static verbs and dynamic verbs. A “verb”is a kind of action
`that is defined by an object and its associated server. In the
`context menus, a verb is an action that is performed in
`response to the selection of an associated menu item. For
`example, the menu item “Open”has an associated verb that
`opens the file or object. Verbs are supported by the
`“MICROSOFT” OLE 2.01 protocol. Static verbs are those
`verbsthat are registered under the “shell” key (note line 3 in
`the above example) within the registry 28. Static verbs may
`be contrasted with dynamic verbs, which are discussed in
`more detail below. In the above example, static verbs for the
`“Open”, “Print”, “PrintTo” and “Preview” menu items are
`registered in the registry 28. In particular, note lines 3-11 in
`the above example.
`An application implements a context menu handler inter-
`face IContextMenu to add more items to a context menu for
`
`
`
`6,008,806
`
`8
`is obtained (step 58). The class ID of the context menu
`handler is contained within the registry 28. The class ID in
`the example given above is contained in brackets on line 14.
`An instance of the context menu handleris created (i.e., an
`object of the specified objectclass is created) and the pointer
`for the [ShellExtInit interface is requested (step 60). The
`“MICROSOFT” OLE2.01 protocol provides interfaces for
`creating objects of given object classes. These functions are
`utilized to create an instance of a context menu handler. The
`
`IShellExtInit interface is used by the explorer to initialize
`shell extension objects, like the context menu handler. This
`interface is defined as follows.
`
`# undef INTERFACE
`#dcfine INTERFACE *IShcllExtInit
`DECLARE_INTERFACE__(IShellExtInit, lunknown)
`// *** TUnknown methods ***
`STDMETHOD(QueryInterface) (THIS_REFRIIDriid,
`LPVOLD*ppvObj)
`P
`.
`STDMETHOD_(ULONG, AddRef) (THIS) PURE;
`STDMETHOD_(ULONG,Release) (THIS) PURE;
`// *** TShellExtInit methods ***
`STDMETHOD(Initialize)
`(THIS_LPCITEMIDLISTpidlFolder, LPDDATAOBJECT
`Ipdobj, HKEY hkeyProgID) PURE;
`
`it
`
`ypedef IShellExtInit * LPSHELLEXTINIT:
`
`Unknownis an interface that all objects must support by
`definition to comply with “MICROSOFT”OLE2.01. Sev-
`eral methods from that interface are incorporated into the
`IShellExtInit interface. Amongst the functions added bythis
`interface is the Initialize() function. The Initialize() function
`is then called to initialize the context menu handler object
`(step 62 in FIG. 5). A pointer to the IContextMenuinterface
`instance provided by the context menu handler object is
`obtained (step 64). The IContextMenuinterfaceis defined as
`follows.
`
`DECLARE_INTERFACE_(IcontextMenu, Iunknown)
`
`// *** TUnknown methods ***
`STDMETHOD(QuerylInterface) (THIS_REFIIDriid,
`LPVOID *ppvObj)
`PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE;
`STDMETHOD_(ULONG,Release) (THIS) PURE;
`STDMETHOD (QueryContextMenu) (THIS_
`HMENU hmenu,
`UINT indexMenu,
`UINT idCmdFirst,
`UINT idCmdLast,
`UINT uFlags) PURE;
`STDMETHOD(InvokeCommand) (THIS_
`LPCMINVOKECOMMANDINFOIpici) PURE;
`STDMETHOD (GetCommandString) (This
`UINTidCmd,
`UINT uFlags,
`UINT *pwReserved,
`LPSTR pszName,
`UINT cchMax) PURE;
`
`Specifically, a QueryInterface() function call is made on
`the context menu handler object to obtain a pointer to the
`instance of the IContextMenu interface provided by the
`context menu handler object. The IContextMenu interface
`includes three functions that are of interest:
`the
`
`the InvokeCommand()
`function,
`QueryContextMenu()
`function, and the GetCommandString()
`function. The
`QueryContextMenu() function allowsthe insertion of one or
`
`10
`
`15
`
`7
`a file object. The added items may be object class specific or
`instance specific. FIG. 3 is a flowchart of the steps that are
`performedto add static verbs to context menus of an object
`in the preferred embodimentof the present invention. First,
`any predefined verbs (i.¢., those that the shell supports) and
`additional verbs provided by a developer are registered
`within the registry 28 (steps 36 and 38 in FIG. 3). The
`operating system 26 provides functions that may becalled to
`add entries within the registry 28. In the preferred embodi-
`mentdescribed herein, these functions are utilized by devel-
`opers to create entries in the registry 28 like those shown in
`lines 4-11 of the above example. These verbs are registered
`in the shell section of the registry and are added to context
`menus of the specified object type (e.g., word processing
`documents). The registration of the verb specifies their menu
`item strings. Once the verbs are registered and the context
`menu has been activated, menu item strings associated with
`the verbsare displayed in the context menu (step 40). For the
`above example, entries for “Open,” “Print,” “PrintTo” and
`“Preview” are all displayed as menu item strings in the
`context menu. A user then selects one of the menu items
`(step 42), and the verb for the selected menu item is
`activated (step 44). Path names are provided within the
`registry 28 for the verbs and are used to invoke the verbs in
`step 44 by calling the InvokeCommand() function of the 5
`IContextMenu interface (which is described in more detail
`below). Examples of such path namesare set forth at lines
`5, 7, 9 and 11 in the above example.
`As discussed above, an application may also register
`dynamic verbs. Unlike static verbs, dynamic verbs are not
`statically assigned to context menus.FIG. 4 is a flowchart of
`the steps that are performed to utilize dynamic verbs in the
`preferred embodiment of the present invention. The process
`is initiated by registering a context menu handler(step 46).
`An object class definition for the context menu object
`handler class must also be provided. In the example given
`above,lines 13 and 14 setforth the entries for registering the
`context menu handler. In particular, the class ID for the
`context menu handlercl