Optical Platform Enabling the vision Microsoft Corporation Agenda
Optical Platform Enabling the vision Microsoft Corporation
Agenda IMAPIv 2 architecture Creating IMAPIv 2 extensions Erase Extension Example Using IMAPIv 2 extensions Shell Extension Example Additional Resources Discussion/Q&A
IMAPIv 2 Architecture IMAPIv 2 Layers (User Mode) Helper Objects Ex: UDF/Joliet/ISO 9660 Enumerates CD/DVD Devices Ex: Data discs, media types, audio CDs Writes large sections of data to the media Ex: Sends commands to device
IMAPIv 2 Architecture IMAPIv 2 Layers (User Mode) Helper Objects User-presented content Ex: UDF/Joliet/ISO 9660 Enumerates CD/DVD Devices Ex: Data discs, media types, audio CDs Writes large sections of data to the media Ex: Sends commands to device
IMAPIv 2 Architecture IMAPIv 2 Layers (User Mode) Helper Objects Enumerates CD/DVD Devices Stream of prepared content Ex: UDF/Joliet/ISO 9660 Ex: Data discs, media types, audio CDs Writes large sections of data to the media Ex: Sends commands to device
IMAPIv 2 Architecture IMAPIv 2 Layers (User Mode) Helper Objects Ex: UDF/Joliet/ISO 9660 Enumerates CD/DVD Devices Writes large sections of data to the media Logical device commands Ex: Data discs, media types, audio CDs Ex: Sends commands to device
IMAPIv 2 Architecture IMAPIv 2 Layers (User Mode) Helper Objects Ex: UDF/Joliet/ISO 9660 Enumerates CD/DVD Devices OS packaged device commands Ex: Data discs, media types, audio CDs Writes large sections of data to the media Ex: Sends commands to device
Extending IMAPIv 2 Hardware 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 IMAPIv 2 to support the new erase method Expose functionality to users through a shell extension Solution Analysis Extend IMAPIv 2 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
IMAPIv 2 Erase Extension Hardware erase example interface IErase. Sample : IDisc. Format 2 { // properties HRESULT Recorder([in] IDisc. Recorder 2 * value); HRESULT Full. Erase([in] VARIANT_BOOL value ); HRESULT Client. Name([in] BSTR name); // methods HRESULT Erase. Media(); } Simple interface that extends IDisc. Format 2 Includes new scenario specific methods and properties
Using IMAPIv 2 Extensions Hardware erase example HRESULT Perform. Erase(VARIANT_BOOL vb. Full. Erase, IDisc. Recorder 2 *p. Disc. Recorder) { // create the new object Co. Create. Instance(CLSID_Erase. Sample, NULL, CLSCTX_ALL, IID_PPV_ARGS(&p. Erase)); // use IDisc. Format 2 method to ensure the operation is supported p. Erase->Is. Current. Media. Supported(p. Disc. Recorder, &vb. Erase. Supported); if (vb. Erase. Supported) { // attach the standard disc recorder p. Erase->put_Recorder(p. Disc. Recorder); // set the appropriate properties p. Erase->put_Full. Erase(vb. Full. Erase); p. Erase->put_Client. Name(Sys. Alloc. String(L"Erase. Shell. Ext")); // perform the erase! p. Erase->Erase. Media(); } }
Additional Resources Documentation and Examples MSDN http: //msdn 2. microsoft. com/en-us/library/aa 366450. aspx WDK and SDK IMAPIv 2 on WHDC http: //www. microsoft. com/whdc/device/stream/DVD/default. mspx Contact Information Optical Platform Discussion Forum http: //forums. microsoft. com/MSDN/Show. Forum. aspx? Forum. ID=490 E-mail: Optissue @ microsoft. com Please don’t send code to this alias!
© 2007 Microsoft Corporation. All rights reserved. Microsoft, 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.
- Slides: 12