Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

  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. // 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. }