UnlockSupport Example for Visual C++

void CEPrintDemoView::OnUnlockSupport()
{
   IEPrint *pLeadPrnt; 
   HRESULT hr; 

   hr = ::CoCreateInstance(CLSID_EPrint, NULL, CLSCTX_ALL, IID_IEPrint, (void**) &pLeadPrnt); 
   if(FAILED(hr)) 
      return; 

   /*Unlock ePrint COM. Note that this is a sample key, which will not work in your toolkit. 
   Before using ePrint COM, you must first execute a License Agreement. 
   Please refer to the "Licensing" Section of the Help File for the applicable Licensing Documents*/

   pLeadPrnt->UnlockSupport(SUPPORT_GENERAL, "Sample Key");

   if(pLeadPrnt) 
   {
      pLeadPrnt->Release();
      pLeadPrnt = NULL; 
   }
}