microsoft corporation. imapiv2 architecture creating imapiv2 extensions erase extension example...
Post on 20-Dec-2015
240 views
TRANSCRIPT
Microsoft CorporationMicrosoft Corporation
IMAPIv2 architectureIMAPIv2 architecture
Creating IMAPIv2 extensionsCreating IMAPIv2 extensionsErase Extension ExampleErase Extension Example
Using IMAPIv2 extensionsUsing IMAPIv2 extensionsShell Extension ExampleShell Extension Example
Additional ResourcesAdditional Resources
Discussion/Q&ADiscussion/Q&A
Helper Objects
Helper Objects
User-presentedUser-presentedcontentcontent
Helper Objects Stream ofStream of
preparedpreparedcontentcontent
Helper Objects
Logical Logical device device
commandscommands
Helper Objects
OS OS packagedpackaged
devicedevicecommandscommands
Example ScenarioExample ScenarioA new type of erase is supported by hardwareA new type of erase is supported by hardware
Developer’s goal is to enable this new functionality through Developer’s goal is to enable this new functionality through Windows for the end userWindows for the end user
StrategyStrategyCreate an extension of IMAPIv2 to support the new Create an extension of IMAPIv2 to support the new erase methoderase method
Expose functionality to users through a shell extensionExpose functionality to users through a shell extension
Solution AnalysisSolution AnalysisExtend IMAPIv2 at the Disc Format levelExtend IMAPIv2 at the Disc Format level
Does not involve user contentDoes not involve user content
Sends a specific sequence of logical commands to the deviceSends a specific sequence of logical commands to the device
Implementation involves media-specific informationImplementation involves media-specific information
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 IDiscFormat2Simple interface that extends IDiscFormat2Includes new scenario specific methods and Includes new scenario specific methods and propertiesproperties
HRESULT PerformErase(VARIANT_BOOL vbFullErase, HRESULT PerformErase(VARIANT_BOOL vbFullErase, IDiscRecorder2 *pDiscRecorder)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(); }}}}
Documentation and ExamplesDocumentation and ExamplesMSDN MSDN
http://msdn2.microsoft.com/en-us/library/aa366450.aspx http://msdn2.microsoft.com/en-us/library/aa366450.aspx
WDK and SDKWDK and SDK
IMAPIv2 on WHDC IMAPIv2 on WHDC http://www.microsoft.com/whdc/device/stream/DVD/http://www.microsoft.com/whdc/device/stream/DVD/default.mspxdefault.mspx
Contact InformationContact InformationOptical Platform Discussion ForumOptical Platform Discussion Forum
http://forums.microsoft.com/MSDN/ShowForum.aspx?http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=490 ForumID=490
E-mail:E-mail:Please don’t send code to this alias!Please don’t send code to this alias!
Optissue @ microsoft.com 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.