Ignore:
Timestamp:
Nov 24, 2000, 11:29:40 AM (25 years ago)
Author:
sandervl
Message:

OB: Merged with latest OLE clip code from Wine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/oleClip.cpp

    r4274 r4685  
    1 /* $Id: oleClip.cpp,v 1.4 2000-09-17 10:31:05 davidr Exp $ */
     1/* $Id: oleClip.cpp,v 1.5 2000-11-24 10:29:40 sandervl Exp $ */
    22/*
    33 *
     
    12341234{
    12351235  HANDLE      hData = 0;
     1236  BOOL bClipboardOpen = FALSE;
     1237  HRESULT hr = S_OK;
     1238 
    12361239  /*
    12371240   * Declare "This" pointer
     
    12671270   * Otherwise, delegate to the Windows clipboard function GetClipboardData
    12681271   */
     1272  if ( !(bClipboardOpen = OpenClipboard(theOleClipboard->hWndClipboard)) )
     1273     HANDLE_ERROR( CLIPBRD_E_CANT_OPEN );
     1274
    12691275  hData = GetClipboardData(pformatetcIn->cfFormat);
    12701276
     
    12751281  pmedium->u.hGlobal = (HGLOBAL)hData;
    12761282  pmedium->pUnkForRelease = NULL;
    1277  
     1283
     1284  hr = S_OK;
     1285
     1286CLEANUP:
     1287  /*
     1288   * Close Windows clipboard
     1289   */
     1290  if ( bClipboardOpen && !CloseClipboard() )
     1291     hr = CLIPBRD_E_CANT_CLOSE;
     1292
     1293  if ( FAILED(hr) )
     1294      return hr;
    12781295  return (hData == 0) ? DV_E_FORMATETC : S_OK;
    12791296}
Note: See TracChangeset for help on using the changeset viewer.