Changeset 4274 for trunk/src


Ignore:
Timestamp:
Sep 17, 2000, 12:31:07 PM (25 years ago)
Author:
davidr
Message:

Updates from wine

Location:
trunk/src/ole32
Files:
1 added
15 edited

Legend:

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

    r3167 r4274  
    1 /* $Id: datacache.cpp,v 1.2 2000-03-19 15:33:05 davidr Exp $ */
     1/* $Id: datacache.cpp,v 1.3 2000-09-17 10:31:02 davidr Exp $ */
    22/*
    33 *  OLE 2 Data cache
     
    6464  DWORD unknown6;
    6565  DWORD unknown7;
    66   DWORD objectExtentX;
    67   DWORD objectExtentY;
    68   DWORD unknown8;
     66  DWORD dwObjectExtentX;
     67  DWORD dwObjectExtentY;
     68  DWORD dwSize;
    6969} PresentationDataHeader;
    7070
     
    10061006}
    10071007
     1008/************************************************************************
     1009 * DataCache_GetData
     1010 *
     1011 * Get Data from a source dataobject using format pformatetcIn->cfFormat
     1012 * See Windows documentation for more details on GetData.
     1013 * TODO: Currently only CF_METAFILEPICT is implemented
     1014 */
    10081015static HRESULT WINAPI DataCache_GetData(
    10091016            IDataObject*     iface,
     
    10111018            STGMEDIUM*       pmedium)
    10121019{
    1013   FIXME("stub\n");
     1020  HRESULT hr = 0;
     1021  HRESULT hrRet = E_UNEXPECTED;
     1022  IPersistStorage *pPersistStorage = 0;
     1023  IStorage *pStorage = 0;
     1024  IStream *pStream = 0;
     1025  OLECHAR name[]={ 2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
     1026  HGLOBAL hGlobalMF = 0;
     1027  void *mfBits = 0;
     1028  PresentationDataHeader pdh;
     1029  METAFILEPICT *mfPict;
     1030  HMETAFILE hMetaFile = 0;
     1031
     1032  if (pformatetcIn->cfFormat == CF_METAFILEPICT)
     1033  {
     1034    /* Get the Persist Storage */
     1035
     1036    hr = IDataObject_QueryInterface(iface, &IID_IPersistStorage, (void**)&pPersistStorage);
     1037
     1038    if (hr != S_OK)
     1039      goto cleanup;
     1040
     1041    /* Create a doc file to copy the doc to a storage */
     1042
     1043    hr = StgCreateDocfile(NULL, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &pStorage);
     1044
     1045    if (hr != S_OK)
     1046      goto cleanup;
     1047
     1048    /* Save it to storage */
     1049
     1050    hr = OleSave(pPersistStorage, pStorage, FALSE);
     1051
     1052    if (hr != S_OK)
     1053      goto cleanup;
     1054
     1055    /* Open the Presentation data srteam */
     1056
     1057    hr = IStorage_OpenStream(pStorage, name, 0, STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &pStream);
     1058
     1059    if (hr != S_OK)
     1060      goto cleanup;
     1061
     1062    /* Read the presentation header */
     1063
     1064    hr = IStream_Read(pStream, &pdh, sizeof(PresentationDataHeader), NULL);
     1065
     1066    if (hr != S_OK)
     1067      goto cleanup;
     1068
     1069    mfBits = HeapAlloc(GetProcessHeap(), 0, pdh.dwSize);
     1070
     1071    /* Read the Metafile bits */
     1072
     1073    hr = IStream_Read(pStream, mfBits, pdh.dwSize, NULL);
     1074
     1075    if (hr != S_OK)
     1076      goto cleanup;
     1077
     1078    /* Create the metafile and place it in the STGMEDIUM structure */
     1079
     1080    hMetaFile = SetMetaFileBitsEx(pdh.dwSize, (BYTE *)mfBits);
     1081
     1082    hGlobalMF = GlobalAlloc(GMEM_SHARE|GMEM_MOVEABLE, sizeof(METAFILEPICT));
     1083    mfPict = (METAFILEPICT *)GlobalLock(hGlobalMF);
     1084    mfPict->hMF = hMetaFile;
     1085
     1086    GlobalUnlock(hGlobalMF);
     1087
     1088    pmedium->u.hGlobal = hGlobalMF;
     1089    pmedium->tymed = TYMED_MFPICT;
     1090    hrRet = S_OK;
     1091
     1092cleanup:
     1093
     1094    if (mfBits)
     1095      HeapFree(GetProcessHeap(), 0, mfBits);
     1096
     1097    if (pStream)
     1098      IStream_Release(pStream);
     1099
     1100    if (pStorage)
     1101      IStorage_Release(pStorage);
     1102
     1103    if (pPersistStorage)
     1104      IPersistStorage_Release(pPersistStorage);
     1105
     1106    return hrRet;
     1107  }
     1108
     1109  /* TODO: Other formats are not implemented */
     1110
    10141111  return E_NOTIMPL;
    10151112}
     
    14851582
    14861583    SetWindowExtEx(hdcDraw,
    1487                    presData.objectExtentX,
    1488                    presData.objectExtentY,
     1584                   presData.dwObjectExtentX,
     1585                   presData.dwObjectExtentY,
    14891586                   &oldWindowExt);
    14901587
     
    17051802  if (SUCCEEDED(hres))
    17061803  {
    1707     lpsizel->cx = presData.objectExtentX;
    1708     lpsizel->cy = presData.objectExtentY;
     1804    lpsizel->cx = presData.dwObjectExtentX;
     1805    lpsizel->cy = presData.dwObjectExtentY;
    17091806  }
    17101807
  • trunk/src/ole32/defaulthandler.cpp

    r1033 r4274  
    1 /* $Id: defaulthandler.cpp,v 1.1 1999-09-24 21:49:43 davidr Exp $ */
     1/* $Id: defaulthandler.cpp,v 1.2 2000-09-17 10:31:03 davidr Exp $ */
    22/*
    33 *  OLE 2 default object handler
     
    101101   * Name of the container and object contained
    102102   */
    103   BSTR containerApp;
    104   BSTR containerObj;
     103  LPWSTR containerApp;
     104  LPWSTR containerObj;
    105105
    106106};
     
    830830   * Be sure to cleanup before re-assinging the strings.
    831831   */
    832   if (This->containerApp!=NULL)
    833   {
    834     SysFreeString(This->containerApp);
     832  if (This->containerApp != NULL)
     833  {
     834    HeapFree( GetProcessHeap(), 0, This->containerApp );
    835835    This->containerApp = NULL;
    836836  }
    837837
    838   if (This->containerObj!=NULL)
    839   {
    840     SysFreeString(This->containerObj);
     838  if (This->containerObj != NULL)
     839  {
     840    HeapFree( GetProcessHeap(), 0, This->containerObj );
    841841    This->containerObj = NULL;
    842842  }
     
    846846   */
    847847  if (szContainerApp != NULL)
    848     This->containerApp = SysAllocString(szContainerApp);
     848  {
     849      if ((This->containerApp = (LPWSTR)HeapAlloc( GetProcessHeap(), 0,
     850                                       (lstrlenW(szContainerApp) + 1) * sizeof(WCHAR) )) != NULL)
     851          lstrcpyW( This->containerApp, szContainerApp );
     852  }
    849853
    850854  if (szContainerObj != NULL)
    851     This->containerObj = SysAllocString(szContainerObj);
    852  
     855  {
     856      if ((This->containerObj = (LPWSTR)HeapAlloc( GetProcessHeap(), 0,
     857                                       (lstrlenW(szContainerObj) + 1) * sizeof(WCHAR) )) != NULL)
     858          lstrcpyW( This->containerObj, szContainerObj );
     859  }
     860
    853861  return S_OK;
    854862}
     
    13071315}
    13081316
     1317/************************************************************************
     1318 * DefaultHandler_GetData
     1319 *
     1320 * Get Data from a source dataobject using format pformatetcIn->cfFormat
     1321 * See Windows documentation for more details on GetData.
     1322 * Default handler's implementation of this method delegates to the cache.
     1323 */
    13091324static HRESULT WINAPI DefaultHandler_GetData(
    1310             IDataObject*     iface,
    1311             LPFORMATETC      pformatetcIn,
    1312             STGMEDIUM*       pmedium)
    1313 {
    1314   FIXME(": Stub\n");
    1315   return E_NOTIMPL;
     1325            IDataObject*     iface,
     1326            LPFORMATETC      pformatetcIn,
     1327            STGMEDIUM*       pmedium)
     1328{
     1329  IDataObject* cacheDataObject = NULL;
     1330  HRESULT      hres;
     1331
     1332  _ICOM_THIS_From_IDataObject(DefaultHandler, iface);
     1333
     1334  TRACE("(%p, %p, %p)\n", iface, pformatetcIn, pmedium);
     1335
     1336  hres = IUnknown_QueryInterface(This->dataCache,
     1337                                 &IID_IDataObject,
     1338                                 (void**)&cacheDataObject);
     1339
     1340  if (FAILED(hres))
     1341    return E_UNEXPECTED;
     1342
     1343  hres = IDataObject_GetData(cacheDataObject,
     1344                             pformatetcIn,
     1345                             pmedium);
     1346
     1347  IDataObject_Release(cacheDataObject);
     1348
     1349  return hres;
    13161350}
    13171351
  • trunk/src/ole32/filemoniker.cpp

    r3167 r4274  
    1 /* $Id: filemoniker.cpp,v 1.2 2000-03-19 15:33:06 davidr Exp $ */
     1/* $Id: filemoniker.cpp,v 1.3 2000-09-17 10:31:03 davidr Exp $ */
    22/*
    33 *  FileMonikers functions.
     
    1717#include "winnls.h"
    1818
    19 DEFAULT_DEBUG_CHANNEL(ole)
     19DEFAULT_DEBUG_CHANNEL(moniker)
    2020
    2121/********************************************************************************/
     
    6363/* IROTData prototype function */
    6464static HRESULT WINAPI FileMonikerROTDataImpl_GetComparaisonData(IROTData* iface,BYTE* pbData,ULONG cbMax,ULONG* pcbData);
    65 
    6665
    6766/********************************************************************************/
     
    347346    DWORD doubleLenHex;
    348347    int i=0;
    349     WCHAR temp = 0;
    350348
    351349
     
    421419 *        FileMoniker_GetSizeMax
    422420 ******************************************************************************/
    423 HRESULT WINAPI FileMonikerImpl_GetSizeMax(IMoniker* iface,
    424                                           ULARGE_INTEGER* pcbSize)/* Pointer to size of stream needed to save object */
     421HRESULT WINAPI FileMonikerImpl_GetSizeMax(IMoniker* iface,ULARGE_INTEGER* pcbSize)
    425422{
    426423    ICOM_THIS(FileMonikerImpl,iface);
    427     DWORD len=lstrlenW(This->filePathName);
    428     DWORD sizeMAx;
    429 
    430     TRACE("(%p,%p)\n",iface,pcbSize);
    431424
    432425    if (pcbSize==NULL)
    433426        return E_POINTER;
    434427
    435     /* for more details see FileMonikerImpl_Save coments */
    436    
    437     sizeMAx =  sizeof(WORD) +           /* first WORD is 0 */
    438                sizeof(DWORD)+           /* length of filePath including "\0" in the end of the string */
    439                (len+1)+                 /* filePath string */
    440                sizeof(DWORD)+           /* constant : 0xDEADFFFF */
    441                10*sizeof(WORD)+         /* 10 zero WORD */
    442                sizeof(DWORD);           /* size of the unicode filePath: "\0" not included */
    443 
    444     if(!This->bIsLongFileName)
    445     {
    446        
    447         sizeMAx += sizeof(DWORD)+           /* size of the unicode filePath: "\0" not included */
    448                    sizeof(WORD)+            /* constant : 0x3 */
    449                    len*sizeof(WCHAR);       /* unicde filePath string */
    450     }
    451    
    452     pcbSize->LowPart=sizeMAx;
    453     pcbSize->HighPart=0;
    454 
     428    /* GetSizeMax = SizeToSave + 2*len + 22 */
     429    FileMonikerImpl_GetSizeToSave(iface,pcbSize);
     430    pcbSize->LowPart += 2 * lstrlenW(This->filePathName) + 22;
     431    pcbSize->HighPart = 0;
     432
     433    TRACE("(iface:%p pcbSize:(LowPart:%ld - HighPart:0))\n",iface,pcbSize->LowPart);
    455434    return S_OK;
    456435}
     436
     437HRESULT FileMonikerImpl_GetSizeToSave(IMoniker* iface,ULARGE_INTEGER* pcbSize)
     438{
     439    ICOM_THIS(FileMonikerImpl,iface);
     440    DWORD len = lstrlenW(This->filePathName);
     441
     442    if (pcbSize==NULL)
     443        return E_POINTER;
     444
     445    pcbSize->LowPart = sizeof(WORD)      +  /* first WORD is 0 */
     446        sizeof(DWORD)     +  /* length of filePath including "\0" in the end of the string */
     447        len + 1           +  /* filePath string */
     448        sizeof(DWORD)     +  /* constant : 0xDEADFFFF */
     449        10 * sizeof(WORD) +  /* 10 zero WORD */
     450        sizeof(DWORD) +       /* size of the unicode filePath: "\0" not included */
     451        ((!This->bIsLongFileName) ?
     452         sizeof(DWORD)     +  /* size of the unicode filePath: "\0" not included */
     453         sizeof(WORD)      +  /* constant : 0x3 */
     454         len * sizeof(WCHAR) : 0); /* unicde filePath string */
     455    pcbSize->HighPart = 0;
     456
     457    return S_OK;
     458}
     459
    457460
    458461void WINAPI FileMonikerImpl_CheckFileFormat(FileMonikerImpl* This, LPCOLESTR lpszPathName)
     
    473476        return;
    474477    }
     478
    475479    len = lstrlenW(lpszPathName);
    476     if(len == 0)
    477     {
    478         return;
    479     }
    480 
    481480    if( len >= 2)
    482481    {
  • trunk/src/ole32/filemoniker.h

    r3167 r4274  
    1 /* $Id: filemoniker.h,v 1.2 2000-03-19 15:35:14 davidr Exp $ */
     1/* $Id: filemoniker.h,v 1.3 2000-09-17 10:29:43 davidr Exp $ */
    22/*
    33 *
     
    3333int     WINAPI FileMonikerImpl_DecomposePath(LPOLESTR str, LPOLESTR** tabStr);
    3434void WINAPI FileMonikerImpl_CheckFileFormat(FileMonikerImpl* iface, LPCOLESTR lpszPathName);
     35HRESULT FileMonikerImpl_GetSizeToSave(IMoniker* iface,ULARGE_INTEGER* pcbSize);
    3536
    3637#endif /* FILEMONIKER_INCLUDED */
  • trunk/src/ole32/itemmoniker.cpp

    r1033 r4274  
    1 /* $Id: itemmoniker.cpp,v 1.1 1999-09-24 21:49:43 davidr Exp $ */
     1/* $Id: itemmoniker.cpp,v 1.2 2000-09-17 10:31:04 davidr Exp $ */
    22/*
    33 *  ItemMonikers implementation
     
    1515#include <assert.h>
    1616
    17 DEFAULT_DEBUG_CHANNEL(ole)
     17DEFAULT_DEBUG_CHANNEL(moniker)
    1818
    1919/* ItemMoniker data structure */
     
    7272HRESULT WINAPI ItemMonikerImpl_Construct(ItemMonikerImpl* iface, LPCOLESTR lpszDelim,LPCOLESTR lpszPathName);
    7373HRESULT WINAPI ItemMonikerImpl_Destroy(ItemMonikerImpl* iface);
     74HRESULT ItemMonikerImpl_GetSizeToSave(IMoniker* iface,ULARGE_INTEGER* pcbSize);
    7475
    7576/********************************************************************************/
     
    245246
    246247    /* read item delimiter string */
    247     itemDelimiterA= (CHAR *)HeapAlloc(GetProcessHeap(),0,delimiterLength);
    248     res=IStream_Read(pStm,itemDelimiterA,delimiterLength,&bread);
    249     if (bread != delimiterLength)
     248    res=IStream_Read(pStm,&delimiterLength,sizeof(DWORD),&bread);
     249    if (bread != sizeof(DWORD))
    250250        return E_FAIL;
    251251
    252     This->itemDelimiter= (WCHAR *)HeapReAlloc(GetProcessHeap(),0,This->itemDelimiter,delimiterLength*sizeof(WCHAR));
    253     if (!This->itemDelimiter)
    254         return E_OUTOFMEMORY;
    255    
    256     lstrcpyAtoW(This->itemDelimiter,itemDelimiterA);
     252    /* read item delimiter string */
     253    if (delimiterLength){
     254        itemDelimiterA=(CHAR *)HeapAlloc(GetProcessHeap(),0,delimiterLength);
     255        res=IStream_Read(pStm,itemDelimiterA,delimiterLength,&bread);
     256        if (bread != delimiterLength)
     257            return E_FAIL;
     258        This->itemDelimiter=(WCHAR *)HeapReAlloc(GetProcessHeap(),0,This->itemDelimiter,delimiterLength*sizeof(WCHAR));
     259        if (!This->itemDelimiter)
     260            return E_OUTOFMEMORY;
     261
     262        lstrcpyAtoW(This->itemDelimiter,itemDelimiterA);
     263    }
     264
    257265
    258266    /* read item name string length + 1*/
     
    262270
    263271    /* read item name string */
    264     itemNameA= (CHAR *)HeapAlloc(GetProcessHeap(),0,nameLength);
    265     res=IStream_Read(pStm,itemNameA,nameLength,&bread);
    266     if (bread != nameLength)
    267         return E_FAIL;
    268 
    269     This->itemName= (WCHAR *)HeapReAlloc(GetProcessHeap(),0,This->itemName,nameLength*sizeof(WCHAR));
    270     if (!This->itemName)
    271         return E_OUTOFMEMORY;
    272    
    273     lstrcpyAtoW(This->itemName,itemNameA);
     272    if (nameLength) {
     273        itemNameA= (CHAR *)HeapAlloc(GetProcessHeap(),0,nameLength);
     274        res=IStream_Read(pStm,itemNameA,nameLength,&bread);
     275        if (bread != nameLength)
     276            return E_FAIL;
     277
     278        This->itemName= (WCHAR *)HeapReAlloc(GetProcessHeap(),0,This->itemName,nameLength*sizeof(WCHAR));
     279        if (!This->itemName)
     280            return E_OUTOFMEMORY;
     281       
     282        lstrcpyAtoW(This->itemName,itemNameA);
     283    }
    274284
    275285    return res;
     
    285295    ICOM_THIS(ItemMonikerImpl,iface);
    286296    HRESULT res;
    287     DWORD delimiterLength=lstrlenW(This->itemDelimiter)+1;
    288     DWORD nameLength=lstrlenW(This->itemName)+1;
    289     CHAR *itemNameA,*itemDelimiterA;
     297    DWORD delimiterLength = 0;
     298    DWORD itemLength = 0;
     299    CHAR *itemNameA = 0, *itemDelimiterA = 0;
    290300
    291301    /* data writen by this function are : 1) DWORD : size of item delimiter string ('\0' included ) */
     
    294304    /*                                    4) String (type A): item name string ('\0' included)               */
    295305
    296     itemNameA= (CHAR *)HeapAlloc(GetProcessHeap(),0,nameLength);
    297     itemDelimiterA= (CHAR *)HeapAlloc(GetProcessHeap(),0,delimiterLength);
    298     lstrcpyWtoA(itemNameA,This->itemName);
    299     lstrcpyWtoA(itemDelimiterA,This->itemDelimiter);
     306    if (This->itemDelimiter){
     307        delimiterLength = lstrlenW(This->itemDelimiter) + 1;
     308        itemDelimiterA=(CHAR *)HeapAlloc(GetProcessHeap(),0,delimiterLength);
     309        lstrcpyWtoA(itemDelimiterA,This->itemDelimiter);
     310    }
     311
     312    if (This->itemName){
     313        itemLength = lstrlenW(This->itemName) + 1;
     314        itemNameA=(CHAR *)HeapAlloc(GetProcessHeap(),0,itemLength);
     315        lstrcpyWtoA(itemNameA,This->itemName);
     316    }
    300317
    301318    res=IStream_Write(pStm,&delimiterLength,sizeof(DWORD),NULL);
    302319    res=IStream_Write(pStm,itemDelimiterA,delimiterLength * sizeof(CHAR),NULL);
    303     res=IStream_Write(pStm,&nameLength,sizeof(DWORD),NULL);
    304     res=IStream_Write(pStm,itemNameA,nameLength * sizeof(CHAR),NULL);
     320    res=IStream_Write(pStm,&itemLength,sizeof(DWORD),NULL);
     321    res=IStream_Write(pStm,itemNameA,itemLength * sizeof(CHAR),NULL);
     322
     323    if (itemNameA)
     324        HeapFree(GetProcessHeap(),0,itemNameA);
     325    if (itemDelimiterA)
     326        HeapFree(GetProcessHeap(),0,itemDelimiterA);
    305327
    306328    return res;
     
    313335                                          ULARGE_INTEGER* pcbSize)/* Pointer to size of stream needed to save object */
    314336{
    315     ICOM_THIS(ItemMonikerImpl,iface);
    316     DWORD delimiterLength=lstrlenW(This->itemDelimiter)+1;
    317     DWORD nameLength=lstrlenW(This->itemName)+1;
    318 
    319     TRACE("(%p,%p)\n",iface,pcbSize);
    320 
    321     if (pcbSize!=NULL)
    322         return E_POINTER;
    323 
    324     /* for more details see ItemMonikerImpl_Save coments */
    325    
    326     pcbSize->LowPart =  sizeof(DWORD) + /* DWORD witch contains delimiter length */
    327                         delimiterLength + /* item delimiter string */
    328                         sizeof(DWORD) + /* DWORD witch contains item name length */
    329                         nameLength + /* item name string */
    330                         34; /* this constant was added ! because when I tested this function it usually */
    331                             /*  returns 34 bytes more than the number of bytes used by IMoniker::Save function */
    332     pcbSize->HighPart=0;
    333 
     337    if (pcbSize==NULL)
     338        return E_POINTER;
     339
     340    /*  SizeMax = 4 * SizeToSave - 6  */
     341    ItemMonikerImpl_GetSizeToSave(iface,pcbSize);
     342    pcbSize->LowPart = 4 * pcbSize->LowPart - 6;
     343    pcbSize->HighPart = 0;
     344
     345    TRACE("(iface:%p pcbSize:(LowPart:%ld - HighPart:0))\n",iface,pcbSize->LowPart);
    334346    return S_OK;
    335347}
     348
     349HRESULT ItemMonikerImpl_GetSizeToSave(IMoniker* iface,ULARGE_INTEGER* pcbSize)
     350{
     351    ICOM_THIS(ItemMonikerImpl,iface);
     352    DWORD delimiterLength = This->itemDelimiter ? lstrlenW(This->itemDelimiter) + 1 : 0;
     353    DWORD itemLength = This->itemName ? lstrlenW(This->itemName) + 1 : 0;
     354
     355    if (pcbSize==NULL)
     356        return E_POINTER;
     357
     358    pcbSize->LowPart =  sizeof(DWORD)   + /* DWORD witch contains delimiter length */
     359        delimiterLength + /* item delimiter string */
     360        sizeof(DWORD)   + /* DWORD witch contains item name length */
     361        itemLength;       /* item string */
     362    pcbSize->HighPart = 0;
     363
     364    return S_OK;
     365}
     366
    336367
    337368/******************************************************************************
     
    340371HRESULT WINAPI ItemMonikerImpl_Construct(ItemMonikerImpl* This, LPCOLESTR lpszDelim,LPCOLESTR lpszItem)
    341372{
    342 
    343     int sizeStr1=lstrlenW(lpszItem);
    344     int sizeStr2=lstrlenW(lpszDelim);
    345 
    346     TRACE("(%p,%p)\n",This,lpszItem);
    347 
    348     /* Initialize the virtual fgunction table. */
     373    /* Initialize the virtual function table. */
    349374    This->lpvtbl1      = &VT_ItemMonikerImpl;
    350375    This->lpvtbl2      = &VT_ROTDataImpl;
    351376    This->ref          = 0;
    352377
    353     This->itemName= (WCHAR *)HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(sizeStr1+1));
    354     This->itemDelimiter= (WCHAR *)HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(sizeStr2+1));
    355 
    356     if ((This->itemName==NULL)||(This->itemDelimiter==NULL))
    357         return E_OUTOFMEMORY;
    358 
    359     lstrcpyW(This->itemName,lpszItem);
    360     lstrcpyW(This->itemDelimiter,lpszDelim);
    361 
     378    This->itemName = 0;
     379    This->itemDelimiter = 0;
     380
     381    if (lpszItem){
     382        This->itemName = (WCHAR *)HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(lstrlenW(lpszItem)+1));
     383        if (!This->itemName)
     384            return E_OUTOFMEMORY;
     385        lstrcpyW(This->itemName,lpszItem);
     386    }
     387    if (lpszDelim){
     388        This->itemDelimiter = (WCHAR *)HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(lstrlenW(lpszDelim)+1));
     389        if (!This->itemDelimiter)
     390            return E_OUTOFMEMORY;
     391        lstrcpyW(This->itemDelimiter,lpszDelim);
     392    }
    362393    return S_OK;
     394
    363395}
    364396
     
    801833        return E_OUTOFMEMORY;
    802834
    803     lstrcpyW(*ppszDisplayName,This->itemDelimiter);
    804     lstrcatW(*ppszDisplayName,This->itemName);
     835    if (This->itemDelimiter) lstrcatW(*ppszDisplayName,This->itemDelimiter);
     836    if (This->itemName)      lstrcatW(*ppszDisplayName,This->itemName);
     837
     838    TRACE("(iface:%p, pbc:%p, pmkToLeft:%p, ppszDisplayName:%s)\n",iface,pbc,pmkToLeft,debugstr_w(*ppszDisplayName));
     839
    805840   
    806841    return S_OK;
  • trunk/src/ole32/iunknown.cpp

    r872 r4274  
    1 /* $Id: iunknown.cpp,v 1.3 1999-09-08 11:29:27 davidr Exp $ */
     1/* $Id: iunknown.cpp,v 1.4 2000-09-17 10:31:05 davidr Exp $ */
    22/*
    33 *
     
    2323// Local Data
    2424// ======================================================================
     25
    2526typedef struct
    2627{
    27     /* IUnknown fields */
    2828    ICOM_VTABLE(IUnknown)* lpvtbl;
    2929    DWORD                  ref;
    3030} IUnknownImpl;
    3131
    32 static ULONG WIN32API IUnknown_fnAddRef(LPUNKNOWN iface);
    33 static ULONG WIN32API IUnknown_fnRelease(LPUNKNOWN iface);
    34 static HRESULT WIN32API IUnknown_fnQueryInterface(LPUNKNOWN iface, REFIID refiid, LPVOID * obj);
     32static ULONG    WIN32API IUnknownImpl_AddRef(LPUNKNOWN iface);
     33static ULONG    WIN32API IUnknownImpl_Release(LPUNKNOWN iface);
     34static HRESULT  WIN32API IUnknownImpl_QueryInterface(LPUNKNOWN iface,
     35                                REFIID riid, LPVOID * ppvObject);
    3536
    36 static ICOM_VTABLE(IUnknown) uvt =
     37static ICOM_VTABLE(IUnknown) IUnknownVt =
    3738{
    38     IUnknown_fnQueryInterface,
    39     IUnknown_fnAddRef,
    40     IUnknown_fnRelease
     39    IUnknownImpl_QueryInterface,
     40    IUnknownImpl_AddRef,
     41    IUnknownImpl_Release
    4142};
    4243
     
    4647
    4748// ----------------------------------------------------------------------
    48 // IUnknown_fnAddRef
     49// IUnknownImpl_AddRef
    4950// ----------------------------------------------------------------------
    50 static ULONG WIN32API IUnknown_fnAddRef(LPUNKNOWN iface)
     51static ULONG WIN32API IUnknownImpl_AddRef(LPUNKNOWN iface)
    5152{
    5253    ICOM_THIS(IUnknownImpl, iface);
    5354
    54     dprintf(("OLE32: (%p)->AddRef()", This));
     55    dprintf(("OLE32: IUnknown(%p)->AddRef()", This));
    5556
    5657    return ++(This->ref);
     
    5859
    5960// ----------------------------------------------------------------------
    60 // IUnknown_fnRelease
     61// IUnknownImpl_Release
    6162// ----------------------------------------------------------------------
    62 static ULONG WIN32API IUnknown_fnRelease(LPUNKNOWN iface)
     63static ULONG WIN32API IUnknownImpl_Release(LPUNKNOWN iface)
    6364{
    6465    ICOM_THIS(IUnknownImpl, iface);
    6566
    66     dprintf(("OLE32: (%p)->Release()\n", This));
     67    dprintf(("OLE32: IUnknown(%p)->Release()\n", This));
    6768
    6869    if (--(This->ref) == 0)
     
    7576
    7677// ----------------------------------------------------------------------
    77 // Initialize
     78// IUnknownImpl_QueryInterface
    7879// ----------------------------------------------------------------------
    79 static HRESULT WIN32API IUnknown_fnQueryInterface(LPUNKNOWN iface, REFIID refiid, LPVOID *obj)
     80static HRESULT WIN32API IUnknownImpl_QueryInterface(LPUNKNOWN iface, REFIID riid, LPVOID *ppvObject)
    8081{
    8182    ICOM_THIS(IUnknownImpl, iface);
    8283
    8384#ifdef DEBUG
    84     oStringA    tRefiid(refiid);
    85     dprintf(("OLE32: (%p)->QueryInterface(%s, %p)\n", This, (char *)tRefiid, obj));
     85    oStringA    tRiid(riid);
     86    dprintf(("OLE32: IUnknown(%p)->QueryInterface(%s)\n", This, (char *)tRiid));
    8687#endif
    8788
    88     if (!memcmp(&IID_IUnknown, refiid, sizeof(IID_IUnknown)))
     89    if (IsEqualIID(&IID_IUnknown, riid))
    8990    {
    90         *obj = This;
    91         return 0;
     91        dprintf(("       ->IUnknown"));
     92        *ppvObject = &(This->lpvtbl);
    9293    }
    93     return OLE_E_ENUM_NOMORE;
     94    else
     95    {
     96        dprintf(("       ->E_NOINTERFACE"));
     97        return E_NOINTERFACE;
     98    }
     99
     100    // Query Interface always increases the reference count by one...
     101    IUnknownImpl_AddRef(iface);
     102
     103    return S_OK;
    94104}
    95105
    96106// ----------------------------------------------------------------------
    97 // Initialize
     107// IUnknownImpl_Constructor
    98108// ----------------------------------------------------------------------
    99 LPUNKNOWN IUnknown_Constructor()
     109LPUNKNOWN IUnknownImpl_Constructor()
    100110{
    101111    IUnknownImpl *      unk;
    102112
    103113    unk = (IUnknownImpl*)HeapAlloc(GetProcessHeap(), 0, sizeof(IUnknownImpl));
    104     unk->lpvtbl = &uvt;
     114    unk->lpvtbl = &IUnknownVt;
    105115    unk->ref    = 1;
    106116    return (LPUNKNOWN)unk;
  • trunk/src/ole32/library.cpp

    r872 r4274  
    1 /* $Id: library.cpp,v 1.2 1999-09-08 11:29:27 davidr Exp $ */
     1/* $Id: library.cpp,v 1.3 2000-09-17 10:31:05 davidr Exp $ */
    22/*
    33 *
     
    5858    dprintf(("OLE32: CoLoadLibrary(%s)", lpszLibName));
    5959
    60     hLibrary = LoadLibraryA(lpszLibName);
     60    hLibrary = LoadLibraryExA(lpszLibName, 0, LOAD_WITH_ALTERED_SEARCH_PATH);
    6161
    6262    if (!bAutoFree)
  • trunk/src/ole32/makefile

    r3864 r4274  
    1 # $Id: makefile,v 1.25 2000-07-19 19:05:12 sandervl Exp $
     1# $Id: makefile,v 1.26 2000-09-17 10:31:07 davidr Exp $
    22
    33#
     
    3838$(OBJDIR)\itemmoniker.obj \
    3939$(OBJDIR)\iunknown.obj \
     40$(OBJDIR)\imessagefilter.obj \
    4041$(OBJDIR)\library.obj \
    4142$(OBJDIR)\memlockbytes.obj \
  • trunk/src/ole32/ole2.cpp

    r872 r4274  
    1 /* $Id: ole2.cpp,v 1.2 1999-09-08 11:29:28 davidr Exp $ */
     1/* $Id: ole2.cpp,v 1.3 2000-09-17 10:31:05 davidr Exp $ */
    22/*
    33 *
     
    2121#include "commctrl.h"
    2222#include "oString.h"
     23#include "heapstring.h"
    2324#include <assert.h>
    2425
     
    155156    HKEY                clsidKey;
    156157    LONG                hres;
     158    LPSTR               buffer;
    157159
    158160    dprintf(("OLE32: OleRegGetUserType"));
     
    180182
    181183    // Allocate a buffer for the registry value.
    182     *pszUserType = (LPOLESTR)CoTaskMemAlloc(cbData);
    183 
    184     if (*pszUserType == NULL)
     184    buffer = (LPSTR)HeapAlloc(GetProcessHeap(), 0, cbData);
     185
     186    if (buffer == NULL)
    185187    {
    186188        RegCloseKey(clsidKey);
     
    188190    }
    189191
    190     hres = RegQueryValueExA(HKEY_CLASSES_ROOT, "", NULL, &dwKeyType, (LPBYTE)*pszUserType, &cbData);
     192    hres = RegQueryValueExA(HKEY_CLASSES_ROOT, "", NULL, &dwKeyType, (LPBYTE)buffer, &cbData);
    191193    RegCloseKey(clsidKey);
    192194    if (hres != ERROR_SUCCESS)
    193195    {
    194         CoTaskMemFree(*pszUserType);
    195         *pszUserType = NULL;
     196        HeapFree(GetProcessHeap(), 0, buffer);
    196197        return REGDB_E_READREGDB;
    197198    }
     199
     200    // Allocate a buffer for the return value.
     201    *pszUserType = (LPOLESTR)CoTaskMemAlloc(cbData * 2);
     202
     203    if (*pszUserType == NULL)
     204    {
     205        HeapFree(GetProcessHeap(), 0, buffer);
     206        return E_OUTOFMEMORY;
     207    }
     208
     209    // Copy & convert to unicode...
     210    lstrcpyAtoW(*pszUserType, buffer);
     211    HeapFree(GetProcessHeap(), 0, buffer);
    198212
    199213    return S_OK;
  • trunk/src/ole32/ole32.h

    r3167 r4274  
    1 /* $Id: ole32.h,v 1.10 2000-03-19 15:35:14 davidr Exp $ */
     1/* $Id: ole32.h,v 1.11 2000-09-17 10:29:43 davidr Exp $ */
    22/*
    33 *
     
    4747#include "wine/obj_cache.h"
    4848
     49#include "debugtools.h"
     50
    4951#endif
  • trunk/src/ole32/oleClip.cpp

    r1606 r4274  
    1 /* $Id: oleClip.cpp,v 1.3 1999-11-05 09:15:51 sandervl Exp $ */
     1/* $Id: oleClip.cpp,v 1.4 2000-09-17 10:31:05 davidr Exp $ */
    22/*
    33 *
     
    1313 *
    1414 * Ported from Wine Implementation (2/9/99)
     15 *   Copyright 2000  Abey George <abey@macadamian.com>
    1516 *   Copyright 1999  Noel Borthwick <noel@macadamian.com>
    1617 *
     
    5556
    5657#include "ole32.h"
     58#include "olestd.h"
    5759#include "commctrl.h"
    5860#include "oString.h"
     61#include "heapstring.h"
     62#include "storage.h"
    5963#include <assert.h>
    6064
     
    136140 
    137141} IEnumFORMATETCImpl;
     142
     143typedef struct PresentationDataHeader
     144{
     145  BYTE unknown1[28];
     146  DWORD dwObjectExtentX;
     147  DWORD dwObjectExtentY;
     148  DWORD dwSize;
     149} PresentationDataHeader;
    138150
    139151/*
     
    153165static void OLEClipbrd_DestroyWindow(HWND hwnd);
    154166LRESULT CALLBACK OLEClipbrd_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
    155 static HRESULT OLEClipbrd_RenderFormat(LPFORMATETC pFormatetc);
     167static HRESULT OLEClipbrd_RenderFormat( IDataObject *pIDataObject, LPFORMATETC pFormatetc );
    156168static HGLOBAL OLEClipbrd_GlobalDupMem( HGLOBAL hGlobalSrc );
    157169
     
    472484  HRESULT hr = S_OK;
    473485  BOOL bClipboardOpen = FALSE;
     486  IDataObject* pIDataObjectSrc = NULL;
    474487 
    475488
     
    486499
    487500  /*
     501   * Addref and save the source data object we are holding on to temporarily,
     502   * since it will be released when we empty the clipboard.
     503   */
     504  pIDataObjectSrc = theOleClipboard->pIDataObjectSrc;
     505  IDataObject_AddRef(pIDataObjectSrc);
     506
     507  /*
    488508   * Open the Windows clipboard
    489509   */
     
    501521   * the windows clipboard.
    502522   */
    503   if ( FAILED( hr = IDataObject_EnumFormatEtc( (IDataObject*)&(theOleClipboard->lpvtbl1),
     523  if ( FAILED( hr = IDataObject_EnumFormatEtc( pIDataObjectSrc,
    504524                                               DATADIR_GET,
    505525                                               &penumFormatetc) ))
     
    510530  while ( S_OK == IEnumFORMATETC_Next(penumFormatetc, 1, &rgelt, NULL) )
    511531  {
    512     if ( rgelt.tymed == TYMED_HGLOBAL )
     532    if (( rgelt.tymed == TYMED_HGLOBAL ) || ( rgelt.tymed == TYMED_ISTORAGE ))
    513533    {
    514534      CHAR szFmtName[80];
     
    520540       * Render the clipboard data
    521541       */
    522       if ( FAILED(OLEClipbrd_RenderFormat( &rgelt )) )
     542      if ( FAILED(OLEClipbrd_RenderFormat( pIDataObjectSrc, &rgelt )) )
    523543        continue;
    524544    }
     545    else
     546      FIXME("(type of medium:%ld not supported yet !!)\n",rgelt.tymed);
    525547  }
    526548 
     
    530552   * Release the data object we are holding on to
    531553   */
    532   if ( theOleClipboard->pIDataObjectSrc )
    533   {
    534     IDataObject_Release(theOleClipboard->pIDataObjectSrc);
    535     theOleClipboard->pIDataObjectSrc = NULL;
    536   }
     554  IDataObject_Release(pIDataObjectSrc);
    537555
    538556CLEANUP:
     
    799817       * (We must have a source data object or we wouldn't be in this WndProc)
    800818       */
    801       OLEClipbrd_RenderFormat( &rgelt );
     819      OLEClipbrd_RenderFormat( (IDataObject*)&(theOleClipboard->lpvtbl1), &rgelt );
    802820
    803821      break;
     
    834852      while ( S_OK == IEnumFORMATETC_Next(penumFormatetc, 1, &rgelt, NULL) )
    835853      {
    836         if ( rgelt.tymed == TYMED_HGLOBAL )
     854        if (( rgelt.tymed == TYMED_HGLOBAL ) || ( rgelt.tymed == TYMED_ISTORAGE ))
    837855        {
    838856          /*
    839857           * Render the clipboard data.
    840858           */
    841           if ( FAILED(OLEClipbrd_RenderFormat( &rgelt )) )
     859          if ( FAILED(OLEClipbrd_RenderFormat( (IDataObject*)&(theOleClipboard->lpvtbl1), &rgelt )) )
    842860            continue;
    843861       
    844862          dprintf(("OLE32: OLEClipbrd_WndProc - WM_RENDERALLFORMATS(cfFormat=%d)\n", rgelt.cfFormat));
    845863        }
     864        else FIXME("(): WM_RENDERALLFORMATS(cfFormat=%d) not supported !!\n", rgelt.cfFormat);
    846865      }
    847866     
     
    888907}
    889908
     909#define MAX_CLIPFORMAT_NAME   80
    890910
    891911/***********************************************************************
     
    895915 * Note: This function assumes it is passed an HGLOBAL format to render.
    896916 */
    897 static HRESULT OLEClipbrd_RenderFormat(LPFORMATETC pFormatetc)
    898 {
    899   STGMEDIUM medium;
     917static HRESULT OLEClipbrd_RenderFormat(IDataObject *pIDataObject, LPFORMATETC pFormatetc)
     918{
     919  STGMEDIUM std;
    900920  HGLOBAL hDup;
    901921  HRESULT hr = S_OK;
    902  
    903   if ( FAILED(hr = IDataObject_GetData((IDataObject*)&(theOleClipboard->lpvtbl1),
    904                                        pFormatetc, &medium)) )
    905   {
    906     dprintf(("OLE32: Warning : IDataObject_GetData failed to render clipboard data! (%lx)\n", hr));
     922  char szFmtName[MAX_CLIPFORMAT_NAME];
     923  ILockBytes *ptrILockBytes = 0;
     924  HGLOBAL hStorage = 0;
     925
     926  GetClipboardFormatNameA(pFormatetc->cfFormat, szFmtName, MAX_CLIPFORMAT_NAME);
     927
     928  /* If embed source */
     929  if (!strcmp(szFmtName, CF_EMBEDSOURCE))
     930  {
     931    memset(&std, 0, sizeof(STGMEDIUM));
     932    std.tymed = pFormatetc->tymed = TYMED_ISTORAGE;
     933
     934    hStorage = GlobalAlloc(GMEM_SHARE|GMEM_MOVEABLE, 0);
     935    hr = CreateILockBytesOnHGlobal(hStorage, FALSE, &ptrILockBytes);
     936    hr = StgCreateDocfileOnILockBytes(ptrILockBytes, STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, &std.u.pstg);
     937
     938    if (FAILED(hr = IDataObject_GetDataHere(pIDataObject, pFormatetc, &std)))
     939    {
     940      WARN("() : IDataObject_GetDataHere failed to render clipboard data! (%lx)\n", hr);
     941      return hr;
     942    }
     943
     944    //if (1) /* check whether the presentation data is already -not- present */
     945    {
     946      FORMATETC fmt2;
     947      STGMEDIUM std2;
     948      METAFILEPICT *mfp = 0;
     949
     950      fmt2.cfFormat = CF_METAFILEPICT;
     951      fmt2.ptd = 0;
     952      fmt2.dwAspect = DVASPECT_CONTENT;
     953      fmt2.lindex = -1;
     954      fmt2.tymed = TYMED_MFPICT;
     955
     956      memset(&std2, 0, sizeof(STGMEDIUM));
     957      std2.tymed = TYMED_MFPICT;
     958
     959      /* Get the metafile picture out of it */
     960
     961      if (!FAILED(hr = IDataObject_GetData(pIDataObject, &fmt2, &std2)))
     962      {
     963        mfp = (METAFILEPICT *)GlobalLock(std2.u.hMetaFilePict);
     964      }
     965
     966      if (mfp)
     967      {
     968        OLECHAR name[]={ 2, 'O', 'l', 'e', 'P', 'r', 'e', 's', '0', '0', '0', 0};
     969        IStream *pStream = 0;
     970        void *mfBits;
     971        PresentationDataHeader pdh;
     972        INT nSize;
     973        CLSID clsID;
     974        LPOLESTR strProgID;
     975        CHAR strOleTypeName[51];
     976        BYTE OlePresStreamHeader [] =
     977        {
     978            0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00,
     979            0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
     980            0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
     981            0x00, 0x00, 0x00, 0x00
     982        };
     983
     984        nSize = GetMetaFileBitsEx(mfp->hMF, 0, NULL);
     985
     986        memset(&pdh, 0, sizeof(PresentationDataHeader));
     987        memcpy(&pdh, OlePresStreamHeader, sizeof(OlePresStreamHeader));
     988
     989        pdh.dwObjectExtentX = mfp->xExt;
     990        pdh.dwObjectExtentY = mfp->yExt;
     991        pdh.dwSize = nSize;
     992
     993        hr = IStorage_CreateStream(std.u.pstg, name, STGM_CREATE|STGM_SHARE_EXCLUSIVE|STGM_READWRITE, 0, 0, &pStream);
     994
     995        hr = IStream_Write(pStream, &pdh, sizeof(PresentationDataHeader), NULL);
     996
     997        mfBits = HeapAlloc(GetProcessHeap(), 0, nSize);
     998        nSize = GetMetaFileBitsEx(mfp->hMF, nSize, mfBits);
     999
     1000        hr = IStream_Write(pStream, mfBits, nSize, NULL);
     1001
     1002        IStream_Release(pStream);
     1003
     1004        HeapFree(GetProcessHeap(), 0, mfBits);
     1005 
     1006        GlobalUnlock(std2.u.hMetaFilePict);
     1007
     1008        ReadClassStg(std.u.pstg, &clsID);
     1009        ProgIDFromCLSID(&clsID, &strProgID);
     1010
     1011        lstrcpyWtoA(strOleTypeName, strProgID);
     1012        OLECONVERT_CreateEmbeddedOleStream(std.u.pstg);
     1013        OLECONVERT_CreateCompObjStream(std.u.pstg, strOleTypeName);
     1014      }
     1015    }
     1016  }
     1017  else
     1018  {
     1019    if (FAILED(hr = IDataObject_GetData(pIDataObject, pFormatetc, &std)))
     1020  {
     1021    WARN("() : IDataObject_GetData failed to render clipboard data! (%lx)\n", hr);
    9071022    return hr;
    9081023  }
     1024     
     1025    /* To put a copy back on the clipboard */
     1026    switch (std.tymed)
     1027    {
     1028        case TYMED_HGLOBAL:
     1029            hStorage = std.u.hGlobal;
     1030            break;
     1031
     1032        case TYMED_ENHMF:
     1033        case TYMED_FILE:
     1034        case TYMED_ISTORAGE:
     1035        case TYMED_ISTREAM:
     1036        case TYMED_GDI:
     1037        case TYMED_MFPICT:
     1038        case TYMED_NULL:
     1039            FIXME("Unsupported data format (tymed=%d)\n", (int) std.tymed);
     1040        default:
     1041            WARN("Unable to render clipboard data, unsupported data format (tymed=%d) \n",
     1042                 (int) std.tymed);
     1043    }
     1044
     1045  }
    9091046
    9101047  /*
     
    9121049   */
    9131050 
    914   if ( !(hDup = OLEClipbrd_GlobalDupMem(medium.u.hGlobal)) )
     1051  if ( !(hDup = OLEClipbrd_GlobalDupMem(hStorage)) )
    9151052    HANDLE_ERROR( E_OUTOFMEMORY );
    9161053       
     
    9181055  {
    9191056    GlobalFree(hDup);
    920     dprintf(("OLE32: Warning : Failed to set rendered clipboard data into clipboard!\n"));
     1057    WARN("() : Failed to set rendered clipboard data into clipboard!\n");
    9211058  }
    9221059
    9231060CLEANUP:
    9241061 
    925   ReleaseStgMedium(&medium);
     1062  ReleaseStgMedium(&std);
    9261063 
    9271064  return hr;
  • trunk/src/ole32/oleMenu.cpp

    r872 r4274  
    1 /* $Id: oleMenu.cpp,v 1.2 1999-09-08 11:29:28 davidr Exp $ */
     1/* $Id: oleMenu.cpp,v 1.3 2000-09-17 10:31:06 davidr Exp $ */
    22/*
    33 *
     
    9595  if ( !(hOleMenu = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT,
    9696                                sizeof(OleMenuDescriptor) ) ) )
    97   return 0;
     97    return 0;
    9898
    9999  pOleMenuDescriptor = (OleMenuDescriptor *) GlobalLock( hOleMenu );
  • trunk/src/ole32/storage.h

    r3167 r4274  
    1 /* $Id: storage.h,v 1.2 2000-03-19 15:35:15 davidr Exp $ */
     1/* $Id: storage.h,v 1.3 2000-09-17 10:29:44 davidr Exp $ */
    22/*
    33 * Compound Storage (32 bit version)
     
    865865         SmallBlockChainStream* This);
    866866
     867// Temp
     868void OLECONVERT_CreateEmbeddedOleStream(LPSTORAGE pStorage);
     869HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName);
     870
    867871
    868872#endif /* __STORAGE32_H__ */
  • trunk/src/ole32/stubs.cpp

    r3178 r4274  
    1 /* $Id: stubs.cpp,v 1.13 2000-03-21 00:38:38 davidr Exp $ */
     1/* $Id: stubs.cpp,v 1.14 2000-09-17 10:31:06 davidr Exp $ */
    22/*
    33 * Win32 COM/OLE stubs for OS/2
     
    174174//*******************************************************************************
    175175//*******************************************************************************
    176 HRESULT WIN32API CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter,
    177                                             LPMESSAGEFILTER *lplpMessageFilter)
    178 {
    179     dprintf(("OLE32: CoRegisterMessageFilter - stub"));
    180     if (lplpMessageFilter)
    181         *lplpMessageFilter = NULL;
    182     return S_FALSE;
    183 }
    184 //*******************************************************************************
    185 //*******************************************************************************
    186176HRESULT WIN32API CoReleaseMarshalData(IStream *pStm)
    187177{
  • trunk/src/ole32/taskmem.cpp

    r1655 r4274  
    1 /* $Id: taskmem.cpp,v 1.3 1999-11-09 10:47:45 bird Exp $ */
     1/* $Id: taskmem.cpp,v 1.4 2000-09-17 10:31:06 davidr Exp $ */
    22/*
    33 *
     
    153153        return S_OK;
    154154    }
    155     return OLE_E_ENUM_NOMORE;
     155    return E_NOINTERFACE;
    156156}
    157157
Note: See TracChangeset for help on using the changeset viewer.