home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / ProdLookUp.cpp < prev    next >
C/C++ Source or Header  |  1997-11-01  |  1KB  |  43 lines

  1. // ProdLookUp.cpp : Implementation of CProdLookUp
  2. #include "stdafx.h"
  3. #include "ProdInfo.h"
  4. #include "ProdLookUp.h"
  5.  
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CProdLookUp
  8.  
  9.  
  10. STDMETHODIMP CProdLookUp::Details(UINT iType,BSTR *pbstrDesc,BSTR *pbstrItem)
  11. {
  12.     HRESULT hr = S_OK;
  13.  
  14.     // cause a server error by ripping it out of memory!
  15.     if (iType == 0)
  16.         ::TerminateProcess(::GetCurrentProcess(),0);
  17.  
  18.     CComBSTR bstr = L"No details available!";
  19.     if (wcscmp(*pbstrDesc,L"AW11722") == 0)
  20.     {
  21.         bstr = L"Locking pear-shaped carabiners.<br>$13.00<br>In Stock";
  22.     }
  23.     else
  24.     if (wcscmp(*pbstrDesc,L"AW21901") == 0)
  25.     {
  26.         bstr = L"Hinged crampons for snow and moderate ice, step-in bindings, one size fits men's 4-12<br>$99.00<br>In Stock";
  27.     }
  28.     else
  29.     if (wcscmp(*pbstrDesc,L"AW41811") == 0)
  30.     {
  31.         bstr = L"Multi-purpose, padded waist, adjustable droppable leg loops, gear racking.<br>$32.00<br><b>Out of Stock</b>";
  32.     }
  33.     else
  34.     if (wcscmp(*pbstrDesc,L"AW71233") == 0)
  35.     {
  36.         bstr = L"High performance endurance shoes.<br>$150.00<br>In Stock";
  37.     }
  38.  
  39.     *pbstrItem = bstr.Copy();
  40.  
  41.     return hr;
  42. }
  43.