home *** CD-ROM | disk | FTP | other *** search
- // ProdLookUp.cpp : Implementation of CProdLookUp
- #include "stdafx.h"
- #include "ProdInfo.h"
- #include "ProdLookUp.h"
-
- /////////////////////////////////////////////////////////////////////////////
- // CProdLookUp
-
-
- STDMETHODIMP CProdLookUp::Details(UINT iType,BSTR *pbstrDesc,BSTR *pbstrItem)
- {
- HRESULT hr = S_OK;
-
- // cause a server error by ripping it out of memory!
- if (iType == 0)
- ::TerminateProcess(::GetCurrentProcess(),0);
-
- CComBSTR bstr = L"No details available!";
- if (wcscmp(*pbstrDesc,L"AW11722") == 0)
- {
- bstr = L"Locking pear-shaped carabiners.<br>$13.00<br>In Stock";
- }
- else
- if (wcscmp(*pbstrDesc,L"AW21901") == 0)
- {
- 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";
- }
- else
- if (wcscmp(*pbstrDesc,L"AW41811") == 0)
- {
- bstr = L"Multi-purpose, padded waist, adjustable droppable leg loops, gear racking.<br>$32.00<br><b>Out of Stock</b>";
- }
- else
- if (wcscmp(*pbstrDesc,L"AW71233") == 0)
- {
- bstr = L"High performance endurance shoes.<br>$150.00<br>In Stock";
- }
-
- *pbstrItem = bstr.Copy();
-
- return hr;
- }
-