Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Corporation. IMAPIv2 architecture Creating IMAPIv2 extensions Erase Extension Example Using IMAPIv2 extensions Shell Extension Example Additional.

Similar presentations


Presentation on theme: "Microsoft Corporation. IMAPIv2 architecture Creating IMAPIv2 extensions Erase Extension Example Using IMAPIv2 extensions Shell Extension Example Additional."— Presentation transcript:

1 Microsoft Corporation

2 IMAPIv2 architecture Creating IMAPIv2 extensions Erase Extension Example Using IMAPIv2 extensions Shell Extension Example Additional Resources Discussion/Q&A

3 Helper Objects

4 User-presented content

5 Helper Objects Stream of prepared content

6 Helper Objects Logical device commands

7 Helper Objects OS packaged device commands

8 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

9 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

10 HRESULT PerformErase(VARIANT_BOOL vbFullErase, IDiscRecorder2 *pDiscRecorder) { // create the new object // create the new object CoCreateInstance(CLSID_EraseSample, CoCreateInstance(CLSID_EraseSample, NULL, CLSCTX_ALL, NULL, CLSCTX_ALL, IID_PPV_ARGS(&pErase)); IID_PPV_ARGS(&pErase)); // use IDiscFormat2 method to ensure the operation is supported // use IDiscFormat2 method to ensure the operation is supported pErase->IsCurrentMediaSupported(pDiscRecorder, &vbEraseSupported); pErase->IsCurrentMediaSupported(pDiscRecorder, &vbEraseSupported); if (vbEraseSupported) { if (vbEraseSupported) { // attach the standard disc recorder // attach the standard disc recorder pErase->put_Recorder(pDiscRecorder); pErase->put_Recorder(pDiscRecorder); // set the appropriate properties // set the appropriate properties pErase->put_FullErase(vbFullErase); pErase->put_FullErase(vbFullErase); pErase->put_ClientName(SysAllocString(L"EraseShellExt")); pErase->put_ClientName(SysAllocString(L"EraseShellExt")); // perform the erase! // perform the erase! pErase->EraseMedia(); pErase->EraseMedia(); }}

11 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

12 © 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.


Download ppt "Microsoft Corporation. IMAPIv2 architecture Creating IMAPIv2 extensions Erase Extension Example Using IMAPIv2 extensions Shell Extension Example Additional."

Similar presentations


Ads by Google