if (S_OK == aDataObject->QueryGetData(pFE)) {
hres = aDataObject->QueryGetData(pFE); DisplayErrCode(hres); if (S_OK == hres) {
static HRESULT FillSTGMedium(IDataObject * aDataObject, UINT aFormat, LPFORMATETC pFE, LPSTGMEDIUM pSTM, DWORD aTymed){  SET_FORMATETC(*pFE, aFormat, 0, DVASPECT_CONTENT, -1, aTymed);  // Starting by querying for the data to see if we can get it as from global memory  HRESULT hres = S_FALSE;  if (S_OK == aDataObject->QueryGetData(pFE)) {    hres = aDataObject->GetData(pFE, pSTM);#if 1 // for debug    if (hres == E_INVALIDARG) {      printf("E_INVALIDARG\n");    }    if (hres == E_UNEXPECTED) {      printf("E_UNEXPECTED\n");    }    if (hres == E_OUTOFMEMORY) {      printf("E_OUTOFMEMORY\n");    }    if (hres == DV_E_LINDEX ) {      printf("DV_E_LINDEX\n");    }    if (hres == DV_E_FORMATETC) {      printf("DV_E_FORMATETC\n");    }     if (hres == DV_E_TYMED) {      printf("DV_E_TYMED\n");    }     if (hres == DV_E_DVASPECT) {      printf("DV_E_DVASPECT\n");    }     if (hres == OLE_E_NOTRUNNING) {      printf("OLE_E_NOTRUNNING\n");    }     if (hres == STG_E_MEDIUMFULL) {      printf("STG_E_MEDIUMFULL\n");    }     if (hres == S_OK) {      printf("S_OK\n");    } #endif  }  return hres;}