Supporting AutoPlay
Previous | Next |
Supporting AutoPlay
AutoPlay is a feature of the Shell that launches applications associated with particular devices. Depending on the current AutoPlay settings, this feature will perform one of several actions, such as presenting a list of available handler applications, displaying a standard folder view of files, and so on.
In Windows Vista, the AutoPlay feature was extended so that a WPD device can provide a list of content types that it supports. Similarly, WPD applications can register content types that they support. For example, a photo acquisition wizard can register as a handler for any WPD device that provides images and a multimedia application can register as a handler for any device that stores audio or video files.
Applications register handler-specific information by writing entries to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers key. Using a WPD application handler (named MyWpdApplication.exe) as an example, the application may insert the following values under a \Handlers\MyWpdApplicationHandler key.
Value | Type | Data |
Action | REG_SZ | Browse content on portable devices. |
CLSIDForCancel | REG_SZ | {00000000-0000-0000-0000-000000000000} |
DefaultIcon | REG_EXPAND_SZ | %SystemDrive%\multimedia\wpd\MyWpdApplication.exe |
InitCmdLine | REG_SZ | /AutoPlay |
ProgID | REG_SZ | MyWpdApplication.MyWpdApplicationAutoPlay |
Provider | REG_SZ | MyWpdApplication |
For more information about the AutoPlay registry keys and values found under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers key, see the corresponding documentation on MSDN.
The WPD AutoPlay Scheme
The WPD AutoPlay scheme integrates with the Windows Vista AutoPlay feature. It does so by supporting three AutoPlay categories, which are described in the following table.
Category | Description |
Source | A WPD device can be treated as a source of content (that is, the content can be transferred from the device). |
Sink | A WPD device can be treated as a destination for content (that is, the content can be transferred to the device). |
Function | A WPD device supports a programmable or controllable capability (for example, it can send and receive SMS messages). |
Applications register for the appropriate source, sink, and/or function category by writing entries to the AutoPlay section of the system registry. These entries appear under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD key. Under the WPD key are the Function, Sink, and Source keys. Under each of these keys is a GUID that corresponds to a WPD functional category or content type.
The following table lists the GUIDs found under the Function key in the registry and identifies the functional category that corresponds to each GUID.
WPD Functional Category | Registry Key (GUID) |
WPD_FUNCTIONAL_CATEGORY_ALL | {2D8A6512-A74C-448E-BA8A-F4AC07C49399} |
WPD_FUNCTIONAL_CATEGORY_AUDIO_CAPTURE | {3F2A1919-C7C2-4A00-855D-F57CF06DEBBB} |
WPD_FUNCTIONAL_CATEGORY_DEVICE | {08EA466B-E3A4-4336-A1F3-A44D2B5C438C} |
WPD_FUNCTIONAL_CATEGORY_NETWORK_CONFIGURATION | {48F4DB72-7C6A-4AB0-9E1A-470E3CDBF26A} |
WPD_FUNCTIONAL_CATEGORY_RENDERING_INFORMATION | {08600BA4-A7BA-4A01-AB0E-0065D0A356D3} |
WPD_FUNCTIONAL_CATEGORY_SMS | {0044A0B1-C1E9-4AFD-B358-A62C6117C9CF} |
WPD_FUNCTIONAL_CATEGORY_STILL_IMAGE_CAPTURE | {613CA327-AB93-4900-B4FA-895BB5874B79} |
WPD_FUNCTIONAL_CATEGORY_STORAGE | {23F05BBC-15DE-4C2A-A55B-A9AF5CE412EF} |
WPD_FUNCTIONAL_CATEGORY_VIDEO_CAPTURE | {E23E5F6B-7243-43AA-8DF1-0EB3D968A918} |
The following table lists the GUIDS found under the Sink and the Source keys in the registry and identifies the content type that corresponds to each GUID.
WPD Content Type | Registry Key (GUID) |
WPD_CONTENT_TYPE_ALL | {80E170D2-1055-4A3E-B952-82CC4F8A8689} |
WPD_CONTENT_TYPE_APPOINTMENT | {0FED060E-8793-4B1E-90C9-48AC389AC631} |
WPD_CONTENT_TYPE_AUDIO | {4AD2C85E-5E2D-45E5-8864-4F229E3C6CF0} |
WPD_CONTENT_TYPE_AUDIO_ALBUM | {AA18737E-5009-48FA-AE21-85F24383B4E6} |
WPD_CONTENT_TYPE_CALENDAR | {A1FD5967-6023-49A0-9DF1-F8060BE751B0} |
WPD_CONTENT_TYPE_CERTIFICATE | {DC3876E8-A948-4060-9050-CBD77E8A3D87} |
WPD_CONTENT_TYPE_CONTACT | {EABA8313-4525-4707-9F0E-87C6808E9435} |
WPD_CONTENT_TYPE_CONTACT_GROUP | {346B8932-4C36-40D8-9415-1828291F9DE9} |
WPD_CONTENT_TYPE_DOCUMENT | {680ADF52-950A-4041-9B41-65E393648155} |
WPD_CONTENT_TYPE_EMAIL | {8038044A-7E51-4F8F-883D-1D0623D14533} |
WPD_CONTENT_TYPE_FOLDER | {27E2E392-A111-48E0-AB0C-E17705A05F85} |
WPD_CONTENT_TYPE_FUNCTIONAL_OBJECT | {99ED0160-17FF-4C44-9D98-1D7A6F941921} |
WPD_CONTENT_TYPE_GENERIC_FILE | {0085E0A6-8D34-45D7-BC5C-447E59C73D48} |
WPD_CONTENT_TYPE_GENERIC_MESSAGE | {E80EAAF8-B2DB-4133-B67E-1BEF4B4A6E5F} |
WPD_CONTENT_TYPE_IMAGE | {EF2107D5-A52A-4243-A26B-62D4176D7603} |
WPD_CONTENT_TYPE_IMAGE_ALBUM | {75793148-15F5-4A30-A813-54ED8A37E226} |
WPD_CONTENT_TYPE_MEDIA_CAST | {5E88B3CC-3E65-4E62-BFFF-229495253AB0} |
WPD_CONTENT_TYPE_MEMO | {9CD20ECF-3B50-414F-A641-E473FFE45751} |
WPD_CONTENT_TYPE_MIXED_CONTENT_ALBUM | {00F0C3AC-A593-49AC-9219-24ABCA5A2563} |
WPD_CONTENT_TYPE_NETWORK_ASSOCIATION | {031DA7EE-18C8-4205-847E-89A11261D0F3} |
WPD_CONTENT_TYPE_PLAYLIST | {1A33F7E4-AF13-48F5-994E-77369DFE04A3} |
WPD_CONTENT_TYPE_PROGRAM | {D269F96A-247C-4BFF-98FB-97F3C49220E6} |
WPD_CONTENT_TYPE_SECTION | {821089F5-1D91-4DC9-BE3C-BBB1B35B18CE} |
WPD_CONTENT_TYPE_TASK | {63252F2C-887F-4CB6-B1AC-D29855DCEF6C} |
WPD_CONTENT_TYPE_UNSPECIFIED | {28D8D31E-249C-454E-AABC-34883168E634} |
WPD_CONTENT_TYPE_VIDEO | {9261B03C-3D78-4519-85E3-02C5E1F50BB9} |
WPD_CONTENT_TYPE_VIDEO_ALBUM | {012B0DB7-D4C1-45D6-B081-94B87779614F} |
WPD_CONTENT_TYPE_WIRELESS_PROFILE | {0BAC070A-9F5F-4DA4-A8F6-3DE44D68FD6C} |
If an application supported a particular function, source, or sink category, it would insert a string specifying the name of the handler key under the GUID that identified the supported functional or content-type category. Using MyWpdApplication as an example, the application would create an entry under the …/EventHandlers/WPD/Function, or /Sink, or /Source keys. This entry would have the form "MyWpdApplicationHandler" and be of type REG_SZ. Also, this entry would appear under the GUID for the functional categories or content types that the application supports.
Previous | Next |