Ignore:
Timestamp:
Nov 24, 2000, 2:19:12 PM (25 years ago)
Author:
sandervl
Message:

KS: Extract icon + icon lookup fixes + changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/folders.c

    r4202 r4691  
    1 /* $Id: folders.c,v 1.2 2000-09-07 18:13:50 sandervl Exp $ */
     1/* $Id: folders.c,v 1.3 2000-11-24 13:19:11 sandervl Exp $ */
    22/*
    3  *      Copyright 1997  Marcus Meissner
    4  *      Copyright 1998  Juergen Schmied
     3 *  Copyright 1997  Marcus Meissner
     4 *  Copyright 1998  Juergen Schmied
    55 *
    66 */
     
    88#define ICOM_CINTERFACE 1
    99#include <odin.h>
     10#include "shellicon.h"
    1011#endif
    1112
     
    3233*/
    3334
    34 typedef struct 
    35 {       ICOM_VFIELD(IExtractIconA);
    36         DWORD   ref;
    37         ICOM_VTABLE(IPersistFile)*      lpvtblPersistFile;
    38         LPITEMIDLIST    pidl;
     35typedef struct
     36{   ICOM_VFIELD(IExtractIconA);
     37    DWORD   ref;
     38    ICOM_VTABLE(IPersistFile)*  lpvtblPersistFile;
     39    LPITEMIDLIST    pidl;
    3940} IExtractIconAImpl;
    4041
     
    5051IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl)
    5152{
    52         IExtractIconAImpl* ei;
    53 
    54         ei=(IExtractIconAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconAImpl));
    55         ei->ref=1;
    56         ICOM_VTBL(ei) = &eivt;
    57         ei->lpvtblPersistFile = &pfvt;
    58         ei->pidl=ILClone(pidl);
    59 
    60         pdump(pidl);
    61 
    62         TRACE("(%p)\n",ei);
    63         shell32_ObjCount++;
    64         return (IExtractIconA *)ei;
     53    IExtractIconAImpl* ei;
     54
     55    ei=(IExtractIconAImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconAImpl));
     56    ei->ref=1;
     57    ICOM_VTBL(ei) = &eivt;
     58    ei->lpvtblPersistFile = &pfvt;
     59    ei->pidl=ILClone(pidl);
     60
     61    pdump(pidl);
     62
     63    TRACE("(%p)\n",ei);
     64    shell32_ObjCount++;
     65    return (IExtractIconA *)ei;
    6566}
    6667/**************************************************************************
     
    6970static HRESULT WINAPI IExtractIconA_fnQueryInterface( IExtractIconA * iface, REFIID riid, LPVOID *ppvObj)
    7071{
    71         ICOM_THIS(IExtractIconAImpl,iface);
    72 
    73         TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
    74 
    75         *ppvObj = NULL;
    76 
    77         if(IsEqualIID(riid, &IID_IUnknown))             /*IUnknown*/
    78         { *ppvObj = This;
    79         }
    80         else if(IsEqualIID(riid, &IID_IPersistFile))    /*IExtractIcon*/
    81         {    *ppvObj = (IPersistFile*)&(This->lpvtblPersistFile);
    82         }
    83         else if(IsEqualIID(riid, &IID_IExtractIconA))   /*IExtractIcon*/
    84         {    *ppvObj = (IExtractIconA*)This;
    85         }
    86 
    87         if(*ppvObj)
    88         { IExtractIconA_AddRef((IExtractIconA*) *ppvObj);       
    89           TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
    90           return S_OK;
    91         }
    92         TRACE("-- Interface: E_NOINTERFACE\n");
    93         return E_NOINTERFACE;
     72    ICOM_THIS(IExtractIconAImpl,iface);
     73
     74    TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
     75
     76    *ppvObj = NULL;
     77
     78    if(IsEqualIID(riid, &IID_IUnknown))     /*IUnknown*/
     79    { *ppvObj = This;
     80    }
     81    else if(IsEqualIID(riid, &IID_IPersistFile))    /*IExtractIcon*/
     82    {    *ppvObj = (IPersistFile*)&(This->lpvtblPersistFile);
     83    }
     84    else if(IsEqualIID(riid, &IID_IExtractIconA))   /*IExtractIcon*/
     85    {    *ppvObj = (IExtractIconA*)This;
     86    }
     87
     88    if(*ppvObj)
     89    { IExtractIconA_AddRef((IExtractIconA*) *ppvObj);
     90      TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
     91      return S_OK;
     92    }
     93    TRACE("-- Interface: E_NOINTERFACE\n");
     94    return E_NOINTERFACE;
    9495}
    9596
     
    99100static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface)
    100101{
    101         ICOM_THIS(IExtractIconAImpl,iface);
    102 
    103         TRACE("(%p)->(count=%lu)\n",This, This->ref );
    104 
    105         shell32_ObjCount++;
    106 
    107         return ++(This->ref);
     102    ICOM_THIS(IExtractIconAImpl,iface);
     103
     104    TRACE("(%p)->(count=%lu)\n",This, This->ref );
     105
     106    shell32_ObjCount++;
     107
     108    return ++(This->ref);
    108109}
    109110/**************************************************************************
     
    112113static ULONG WINAPI IExtractIconA_fnRelease(IExtractIconA * iface)
    113114{
    114         ICOM_THIS(IExtractIconAImpl,iface);
    115 
    116         TRACE("(%p)->()\n",This);
    117 
    118         shell32_ObjCount--;
    119 
    120         if (!--(This->ref))
    121         { TRACE(" destroying IExtractIcon(%p)\n",This);
    122           SHFree(This->pidl);
    123           HeapFree(GetProcessHeap(),0,This);
    124           return 0;
    125         }
    126         return This->ref;
     115    ICOM_THIS(IExtractIconAImpl,iface);
     116
     117    TRACE("(%p)->()\n",This);
     118
     119    shell32_ObjCount--;
     120
     121    if (!--(This->ref))
     122    { TRACE(" destroying IExtractIcon(%p)\n",This);
     123      SHFree(This->pidl);
     124      HeapFree(GetProcessHeap(),0,This);
     125      return 0;
     126    }
     127    return This->ref;
    127128}
    128129/**************************************************************************
     
    132133*/
    133134static HRESULT WINAPI IExtractIconA_fnGetIconLocation(
    134         IExtractIconA * iface,
    135         UINT uFlags,
    136         LPSTR szIconFile,
    137         UINT cchMax,
    138         int * piIndex,
    139         UINT * pwFlags)
    140 {
    141         ICOM_THIS(IExtractIconAImpl,iface);
    142 
    143         char    sTemp[MAX_PATH];
    144         DWORD   dwNr;
    145         GUID const * riid;
    146         LPITEMIDLIST    pSimplePidl = ILFindLastID(This->pidl);
    147                        
    148         TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags);
    149 
    150         if (pwFlags)
    151           *pwFlags = 0;
    152 
    153         if (_ILIsDesktop(pSimplePidl))
    154         {
    155           lstrcpynA(szIconFile, "shell32.dll", cchMax);
    156           *piIndex = 34;
    157         }
    158 
    159         /* my computer and other shell extensions */
    160         else if ( (riid = _ILGetGUIDPointer(pSimplePidl)) )
    161         {
    162           char xriid[50];
     135    IExtractIconA * iface,
     136    UINT uFlags,
     137    LPSTR szIconFile,
     138    UINT cchMax,
     139    int * piIndex,
     140    UINT * pwFlags)
     141{
     142    ICOM_THIS(IExtractIconAImpl,iface);
     143
     144    char    sTemp[MAX_PATH];
     145    DWORD   dwNr;
     146    GUID const * riid;
     147    LPITEMIDLIST    pSimplePidl = ILFindLastID(This->pidl);
     148
     149    TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags);
     150
     151    if (pwFlags)
     152      *pwFlags = 0;
     153
     154    if (_ILIsDesktop(pSimplePidl))
     155    {
     156      lstrcpynA(szIconFile, "shell32.dll", cchMax);
     157#ifdef __WIN32OS2__
     158      *piIndex = SHLICON_DESKTOP;
     159#else
     160      *piIndex = 34;
     161#endif
     162    }
     163
     164    /* my computer and other shell extensions */
     165    else if ( (riid = _ILGetGUIDPointer(pSimplePidl)) )
     166    {
     167      char xriid[50];
    163168          sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
    164169                   riid->Data1, riid->Data2, riid->Data3,
     
    166171                   riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
    167172
    168           if (HCR_GetDefaultIcon(xriid, sTemp, MAX_PATH, &dwNr))
    169           {
    170             lstrcpynA(szIconFile, sTemp, cchMax);
    171             *piIndex = dwNr;
    172           }
    173           else
    174           {
    175             lstrcpynA(szIconFile, "shell32.dll", cchMax);
    176             *piIndex = 15;
    177           }
    178         }
    179 
    180         else if (_ILIsDrive (pSimplePidl))
    181         {
    182           if (HCR_GetDefaultIcon("Drive", sTemp, MAX_PATH, &dwNr))
    183           {
    184             lstrcpynA(szIconFile, sTemp, cchMax);
    185             *piIndex = dwNr;
    186           }
    187           else
    188           {
    189             lstrcpynA(szIconFile, "shell32.dll", cchMax);
    190             *piIndex = 8;
    191           }
    192         }
    193         else if (_ILIsFolder (pSimplePidl))
    194         {
    195           if (HCR_GetDefaultIcon("Folder", sTemp, MAX_PATH, &dwNr))
    196           {
    197             lstrcpynA(szIconFile, sTemp, cchMax);
    198             *piIndex = dwNr;
    199           }
    200           else
    201           {
    202             lstrcpynA(szIconFile, "shell32.dll", cchMax);
    203             *piIndex = (uFlags & GIL_OPENICON)? 4 : 3;
    204           }
    205         }
    206         else    /* object is file */
    207         {
     173      if (HCR_GetDefaultIcon(xriid, sTemp, MAX_PATH, &dwNr))
     174      {
     175        lstrcpynA(szIconFile, sTemp, cchMax);
     176        *piIndex = dwNr;
     177      }
     178      else
     179      {
     180#ifdef __WIN32OS2__
     181        /* Not correct. Originally location is explorer.exe, index 1 */
     182        lstrcpynA(szIconFile, "shell32.dll", cchMax);
     183        *piIndex = -SHLICON_MYCOMPUTER;
     184
     185        /* 15 is absolutely wrong! ( Another computer in the network ) */
     186#else
     187        lstrcpynA(szIconFile, "shell32.dll", cchMax);
     188        *piIndex = 15;
     189#endif
     190      }
     191    }
     192    else if (_ILIsDrive (pSimplePidl))
     193    {
     194#ifdef __WIN32OS2__
     195      lstrcpynA(szIconFile, "shell32.dll", cchMax);
     196      *piIndex = 8; /* hard disk */
     197
     198      if ( _ILGetDrive( pSimplePidl, sTemp, cchMax ) )
     199      {
     200        if ( ( sTemp[ 0 ] == 'A' ) || ( sTemp[ 0 ] == 'a' ) ||
     201             ( sTemp[ 0 ] == 'B' ) || ( sTemp[ 0 ] == 'b' ) )
     202        {
     203            /* FIXME determine 5.25 Floppy */
     204            *piIndex = SHLICON_FLOPPY35;
     205        }
     206        else
     207        {
     208            UINT nType = GetDriveTypeA( sTemp );
     209            switch ( nType )
     210            {
     211                case DRIVE_REMOVABLE:
     212                    *piIndex = SHLICON_REMOVABLE_DISK;
     213                    break;
     214
     215                case DRIVE_FIXED:
     216                    *piIndex = SHLICON_HARDDISK;
     217                    break;
     218
     219                case DRIVE_REMOTE:
     220                {
     221                    /* FIXME: connected (9) / disconnected (10)state */
     222                    BOOL connected = TRUE;
     223                    if ( connected )
     224                        *piIndex = SHLICON_NETDRIVE_CONN;
     225                    else
     226                        *piIndex = SHLICON_NETDRIVE_DISCON;
     227                    break;
     228                }
     229                case DRIVE_CDROM:
     230                    *piIndex = SHLICON_CDROM_DRIVE;
     231                    break;
     232
     233                case DRIVE_RAMDISK:
     234                    *piIndex = SHLICON_RAMDRIVE;
     235                    break;
     236
     237                case DRIVE_UNKNOWN:
     238                case DRIVE_NO_ROOT_DIR:
     239                default:
     240                    *piIndex = SHLICON_HARDDISK;
     241                    break;
     242            }
     243        }
     244      }
     245
     246      if ( ( *piIndex == 8 ) &&
     247           HCR_GetDefaultIcon( "Drive", sTemp, MAX_PATH, &dwNr ) )
     248      {
     249        /* kso: Are there special registry keys for particular drives? */
     250        lstrcpynA(szIconFile, sTemp, cchMax);
     251        *piIndex = dwNr;
     252      }
     253#else
     254      if (HCR_GetDefaultIcon("Drive", sTemp, MAX_PATH, &dwNr))
     255      {
     256        lstrcpynA(szIconFile, sTemp, cchMax);
     257        *piIndex = dwNr;
     258      }
     259      else
     260      {
     261        lstrcpynA(szIconFile, "shell32.dll", cchMax);
     262        *piIndex = 8;
     263      }
     264#endif
     265    }
     266    else if (_ILIsFolder (pSimplePidl))
     267    {
     268      if (HCR_GetDefaultIcon("Folder", sTemp, MAX_PATH, &dwNr))
     269      {
     270        lstrcpynA(szIconFile, sTemp, cchMax);
     271        *piIndex = dwNr;
     272      }
     273      else
     274      {
     275        lstrcpynA(szIconFile, "shell32.dll", cchMax);
     276        *piIndex = (uFlags & GIL_OPENICON)? 4 : 3;
     277      }
     278    }
     279    else    /* object is file */
     280    {
    208281#ifdef __WIN32OS2__
    209282          if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH))
     
    222295            {
    223296              //icon is in the file/file is icon
    224               if (stricmp(sTemp,"EXE") == 0) //CB: add more
    225               {
    226                 SHGetPathFromIDListA(This->pidl, sTemp);
    227                 dwNr = 0;
     297              if ((stricmp(sTemp,"EXE") == 0) ||
     298                  (stricmp(sTemp,"ICO") == 0))
     299              {
     300                SHGetPathFromIDListA(This->pidl, sTemp);
    228301                lstrcpynA(szIconFile, sTemp, cchMax);
    229                 *piIndex = dwNr;
    230               } else //default icon
     302                *piIndex = 0;
     303              }
     304              else if (stricmp(sTemp,"FND") == 0)
     305              {
     306                SHGetPathFromIDListA(This->pidl, sTemp);
     307                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     308#ifdef __WIN32OS2__
     309                *piIndex = SHLICON_TREE; //???
     310#else
     311                *piIndex = 42;
     312#endif
     313              }
     314              else if (stricmp(sTemp,"COM") == 0)
     315              {
     316                SHGetPathFromIDListA(This->pidl, sTemp);
     317                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     318#ifdef __WIN32OS2__
     319                *piIndex = SHLICON_APPLICATION;
     320#else
     321                *piIndex = 2;
     322#endif
     323              }
     324#if 0
     325    // icons not yet in resources
     326
     327              else if ((stricmp(sTemp,"INI") == 0) ||
     328                       (stricmp(sTemp,"INF") == 0))
     329              {
     330                SHGetPathFromIDListA(This->pidl, sTemp);
     331                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     332                *piIndex = -151;
     333              }
     334              else if (stricmp(sTemp,"TXT") == 0)
     335              {
     336                SHGetPathFromIDListA(This->pidl, sTemp);
     337                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     338                *piIndex = -152;
     339              }
     340              else if ((stricmp(sTemp,"BAT") == 0) ||
     341                       (stricmp(sTemp,"CMD") == 0))
     342              {
     343                SHGetPathFromIDListA(This->pidl, sTemp);
     344                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     345                *piIndex = -153;
     346              }
     347              else if ((stricmp(sTemp,"DLL") == 0) ||
     348                       (stricmp(sTemp,"SYS") == 0) ||
     349                       (stricmp(sTemp,"VXD") == 0) ||
     350                       (stricmp(sTemp,"DRV") == 0) ||
     351                       (stricmp(sTemp,"CPL") == 0))
     352              {
     353                SHGetPathFromIDListA(This->pidl, sTemp);
     354                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     355                *piIndex = -154;
     356              }
     357              else if (stricmp(sTemp,"FON") == 0)
     358              {
     359                SHGetPathFromIDListA(This->pidl, sTemp);
     360                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     361                *piIndex = -155;
     362              }
     363              else if (stricmp(sTemp,"TTF") == 0)
     364              {
     365                SHGetPathFromIDListA(This->pidl, sTemp);
     366                lstrcpynA(szIconFile,"shell32.dll", cchMax);
     367                *piIndex = -156;
     368              }
     369#endif
     370              else //default icon
    231371              {
    232372                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     
    241381        }
    242382#else
    243           if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH)
    244               && HCR_MapTypeToValue(sTemp, sTemp, MAX_PATH, TRUE)
    245               && HCR_GetDefaultIcon(sTemp, sTemp, MAX_PATH, &dwNr))
    246           {
    247             if (!strcmp("%1",sTemp))            /* icon is in the file */
    248             {
    249               SHGetPathFromIDListA(This->pidl, sTemp);
    250               dwNr = 0;
    251             }
    252             lstrcpynA(szIconFile, sTemp, cchMax);
    253             *piIndex = dwNr;
    254           }
    255           else                                  /* default icon */
    256           {
    257             lstrcpynA(szIconFile, "shell32.dll", cchMax);
    258             *piIndex = 0;
    259           }
    260         }
    261 #endif
    262         TRACE("-- %s %x\n", szIconFile, *piIndex);
    263         return NOERROR;
     383      if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH)
     384          && HCR_MapTypeToValue(sTemp, sTemp, MAX_PATH, TRUE)
     385          && HCR_GetDefaultIcon(sTemp, sTemp, MAX_PATH, &dwNr))
     386      {
     387        if (!strcmp("%1",sTemp))        /* icon is in the file */
     388        {
     389          SHGetPathFromIDListA(This->pidl, sTemp);
     390          dwNr = 0;
     391        }
     392        lstrcpynA(szIconFile, sTemp, cchMax);
     393        *piIndex = dwNr;
     394      }
     395      else                  /* default icon */
     396      {
     397        lstrcpynA(szIconFile, "shell32.dll", cchMax);
     398        *piIndex = 0;
     399      }
     400    }
     401#endif
     402    TRACE("-- %s %x\n", szIconFile, *piIndex);
     403    return NOERROR;
    264404}
    265405/**************************************************************************
     
    268408static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize)
    269409{
    270         ICOM_THIS(IExtractIconAImpl,iface);
    271 
    272         FIXME("(%p) (file=%p index=%u %p %p size=%u) semi-stub\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize);
    273 
    274         if (phiconLarge)
    275           *phiconLarge = pImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT);
    276 
    277         if (phiconSmall)
    278           *phiconSmall = pImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT);
    279 
    280         return S_OK;
    281 }
    282 
    283 static struct ICOM_VTABLE(IExtractIconA) eivt = 
    284 {       
    285         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    286         IExtractIconA_fnQueryInterface,
    287         IExtractIconA_fnAddRef,
    288         IExtractIconA_fnRelease,
    289         IExtractIconA_fnGetIconLocation,
    290         IExtractIconA_fnExtract
     410    ICOM_THIS(IExtractIconAImpl,iface);
     411
     412    FIXME("(%p) (file=%p index=%u %p %p size=%u) semi-stub\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize);
     413
     414    if (phiconLarge)
     415      *phiconLarge = pImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT);
     416
     417    if (phiconSmall)
     418      *phiconSmall = pImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT);
     419
     420    return S_OK;
     421}
     422
     423static struct ICOM_VTABLE(IExtractIconA) eivt =
     424{
     425    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     426    IExtractIconA_fnQueryInterface,
     427    IExtractIconA_fnAddRef,
     428    IExtractIconA_fnRelease,
     429    IExtractIconA_fnGetIconLocation,
     430    IExtractIconA_fnExtract
    291431};
    292432
     
    295435 */
    296436static HRESULT WINAPI IEIPersistFile_fnQueryInterface(
    297         IPersistFile    *iface,
    298         REFIID          iid,
    299         LPVOID          *ppvObj)
    300 {
    301         _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
    302 
    303         return IShellFolder_QueryInterface((IExtractIconA*)This, iid, ppvObj);
     437    IPersistFile    *iface,
     438    REFIID      iid,
     439    LPVOID      *ppvObj)
     440{
     441    _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
     442
     443    return IShellFolder_QueryInterface((IExtractIconA*)This, iid, ppvObj);
    304444}
    305445
     
    308448 */
    309449static ULONG WINAPI IEIPersistFile_fnAddRef(
    310         IPersistFile    *iface)
    311 {
    312         _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
    313 
    314         return IExtractIconA_AddRef((IExtractIconA*)This);
     450    IPersistFile    *iface)
     451{
     452    _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
     453
     454    return IExtractIconA_AddRef((IExtractIconA*)This);
    315455}
    316456
     
    319459 */
    320460static ULONG WINAPI IEIPersistFile_fnRelease(
    321         IPersistFile    *iface)
    322 {
    323         _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
    324 
    325         return IExtractIconA_Release((IExtractIconA*)This);
     461    IPersistFile    *iface)
     462{
     463    _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
     464
     465    return IExtractIconA_Release((IExtractIconA*)This);
    326466}
    327467
     
    330470 */
    331471static HRESULT WINAPI IEIPersistFile_fnGetClassID(
    332         IPersistFile    *iface,
    333         LPCLSID         lpClassId)
    334 {
    335         CLSID StdFolderID = { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
    336 
    337         if (lpClassId==NULL)
    338           return E_POINTER;
    339 
    340         memcpy(lpClassId, &StdFolderID, sizeof(StdFolderID));
    341 
    342         return S_OK;
     472    IPersistFile    *iface,
     473    LPCLSID     lpClassId)
     474{
     475    CLSID StdFolderID = { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
     476
     477    if (lpClassId==NULL)
     478      return E_POINTER;
     479
     480    memcpy(lpClassId, &StdFolderID, sizeof(StdFolderID));
     481
     482    return S_OK;
    343483}
    344484
     
    348488static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
    349489{
    350         _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
    351         FIXME("%p\n", This);
    352         return E_NOTIMPL;
     490    _ICOM_THIS_From_IPersistFile(IExtractIconA, iface);
     491    FIXME("%p\n", This);
     492    return E_NOTIMPL;
    353493
    354494}
     
    396536static struct ICOM_VTABLE(IPersistFile) pfvt =
    397537{
    398         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    399         IEIPersistFile_fnQueryInterface,
    400         IEIPersistFile_fnAddRef,
    401         IEIPersistFile_fnRelease,
    402         IEIPersistFile_fnGetClassID,
     538    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     539    IEIPersistFile_fnQueryInterface,
     540    IEIPersistFile_fnAddRef,
     541    IEIPersistFile_fnRelease,
     542    IEIPersistFile_fnGetClassID,
    403543#ifdef __WIN32OS2__
    404544        IEIPersistFile_fnIsDirty,       /* IEIPersistFile_fnIsDirty */
    405545#else
    406         (void *) 0xdeadbeef /* IEIPersistFile_fnIsDirty */,
    407 #endif
    408         IEIPersistFile_fnLoad,
     546    (void *) 0xdeadbeef /* IEIPersistFile_fnIsDirty */,
     547#endif
     548    IEIPersistFile_fnLoad,
    409549#ifdef __WIN32OS2__
    410550        IEIPersistFile_fnSave,          /* IEIPersistFile_fnSave */
     
    412552        IEIPersistFile_fnGetCurFile     /* IEIPersistFile_fnGetCurFile */
    413553#else
    414         (void *) 0xdeadbeef /* IEIPersistFile_fnSave */,
    415         (void *) 0xdeadbeef /* IEIPersistFile_fnSaveCompleted */,
    416         (void *) 0xdeadbeef /* IEIPersistFile_fnGetCurFile */
     554    (void *) 0xdeadbeef /* IEIPersistFile_fnSave */,
     555    (void *) 0xdeadbeef /* IEIPersistFile_fnSaveCompleted */,
     556    (void *) 0xdeadbeef /* IEIPersistFile_fnGetCurFile */
    417557#endif
    418558};
Note: See TracChangeset for help on using the changeset viewer.