oledup.c
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 1k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //---------------------------------------------------------------------------
  2. //
  3. // Copyright (c) Microsoft Corporation 1993-1994
  4. //
  5. // File: oledup.c
  6. //
  7. //  This files contains duplicated code the OLE would provide.
  8. //  We do this so we don't have to link to OLE for M6.
  9. //  BUGBUG: we should remove this for M7 (why?  the shell does this too)
  10. //
  11. // History:
  12. //  02-14-94 ScottH     Created (copied from shell)
  13. //
  14. //---------------------------------------------------------------------------
  15. /////////////////////////////////////////////////////  INCLUDES
  16. #include "brfprv.h"         // common headers
  17. HRESULT MyReleaseStgMedium(LPSTGMEDIUM pmedium)
  18.     {
  19.     if (pmedium->pUnkForRelease)
  20.         {
  21.         pmedium->pUnkForRelease->lpVtbl->Release(pmedium->pUnkForRelease);
  22.         }
  23.     else
  24.         {
  25.         switch(pmedium->tymed)
  26.             {
  27.         case TYMED_HGLOBAL:
  28.             GlobalFree(pmedium->hGlobal);
  29.             break;
  30.         default:
  31.             // Not fullly implemented.
  32.             MessageBeep(0);
  33.             break;
  34.             }
  35.         }
  36.     return NOERROR;
  37.     }