120 likes | 252 Views
Optical Platform Enabling the vision. Microsoft Corporation. Agenda. IMAPIv2 architecture Creating IMAPIv2 extensions Erase Extension Example Using IMAPIv2 extensions Shell Extension Example Additional Resources Discussion/Q&A. IMAPIv2 Architecture. IMAPIv2 Layers (User Mode).
E N D
Optical PlatformEnabling the vision Microsoft Corporation
Agenda • IMAPIv2 architecture • Creating IMAPIv2 extensions • Erase Extension Example • Using IMAPIv2 extensions • Shell Extension Example • Additional Resources • Discussion/Q&A
IMAPIv2 Architecture IMAPIv2 Layers (User Mode) Helper Objects Content Formats Ex: UDF/Joliet/ISO9660 Disc Master EnumeratesCD/DVDDevices Physical Media Formats Ex: Data discs, media types, audio CDs Write Engine Writes largesectionsof data to the media Disc Recorder Ex: Sends commands to device
IMAPIv2 Architecture IMAPIv2 Layers (User Mode) Helper Objects User-presentedcontent Content Formats Ex: UDF/Joliet/ISO9660 Disc Master EnumeratesCD/DVDDevices Physical Media Formats Ex: Data discs, media types, audio CDs Write Engine Writes largesectionsof data to the media Disc Recorder Ex: Sends commands to device
IMAPIv2 Architecture IMAPIv2 Layers (User Mode) Helper Objects Content Formats Ex: UDF/Joliet/ISO9660 Disc Master EnumeratesCD/DVDDevices Stream ofpreparedcontent Physical Media Formats Ex: Data discs, media types, audio CDs Write Engine Writes largesectionsof data to the media Disc Recorder Ex: Sends commands to device
IMAPIv2 Architecture IMAPIv2 Layers (User Mode) Helper Objects Content Formats Ex: UDF/Joliet/ISO9660 Disc Master EnumeratesCD/DVDDevices Physical Media Formats Ex: Data discs, media types, audio CDs Write Engine Writes largesectionsof data to the media Logical device commands Disc Recorder Ex: Sends commands to device
IMAPIv2 Architecture IMAPIv2 Layers (User Mode) Helper Objects Content Formats Ex: UDF/Joliet/ISO9660 Disc Master EnumeratesCD/DVDDevices Physical Media Formats Ex: Data discs, media types, audio CDs Write Engine Writes largesectionsof data to the media OS packageddevicecommands Disc Recorder Ex: Sends commands to device
Extending IMAPIv2Hardware erase example • Example Scenario • A new type of erase is supported by hardware • Developer’s goal is to enable this new functionality through Windows for the end user • Strategy • Create an extension of IMAPIv2 to support the new erase method • Expose functionality to users through a shell extension • Solution Analysis • Extend IMAPIv2 at the Disc Format level • Does not involve user content • Sends a specific sequence of logical commands to the device • Implementation involves media-specific information
IMAPIv2 Erase ExtensionHardware erase example interface IEraseSample : IDiscFormat2 { // properties HRESULT Recorder([in] IDiscRecorder2 * value); HRESULT FullErase([in] VARIANT_BOOL value ); HRESULT ClientName([in] BSTR name); // methods HRESULT EraseMedia(); } • Simple interface that extends IDiscFormat2 • Includes new scenario specific methods and properties
Using IMAPIv2 ExtensionsHardware erase example HRESULT PerformErase(VARIANT_BOOL vbFullErase, IDiscRecorder2 *pDiscRecorder) { // create the new object CoCreateInstance(CLSID_EraseSample, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pErase)); // use IDiscFormat2 method to ensure the operation is supported pErase->IsCurrentMediaSupported(pDiscRecorder, &vbEraseSupported); if (vbEraseSupported) { // attach the standard disc recorder pErase->put_Recorder(pDiscRecorder); // set the appropriate properties pErase->put_FullErase(vbFullErase); pErase->put_ClientName(SysAllocString(L"EraseShellExt")); // perform the erase! pErase->EraseMedia(); } }
Additional Resources • Documentation and Examples • MSDN • http://msdn2.microsoft.com/en-us/library/aa366450.aspx • WDK and SDK • IMAPIv2 on WHDC • http://www.microsoft.com/whdc/device/stream/DVD/default.mspx • Contact Information • Optical Platform Discussion Forum • http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=490 • E-mail: • Please don’t send code to this alias! • Optissue @ microsoft.com
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.