Ignore:
Timestamp:
Aug 18, 2000, 4:01:27 AM (25 years ago)
Author:
phaller
Message:

Synchronized shell32 with wine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shell32_main.cpp

    r3551 r4032  
    1 /* $Id: shell32_main.cpp,v 1.11 2000-05-18 14:16:03 sandervl Exp $ */
     1/* $Id: shell32_main.cpp,v 1.12 2000-08-18 02:01:19 phaller Exp $ */
    22
    33/*
     
    4949#include "wine/undocshell.h"
    5050#include "shpolicy.h"
     51#include "shlwapi.h"
    5152
    5253#include <heapstring.h>
     
    148149   DWORD ret = TRUE, dwAttributes = 0;
    149150   IShellFolder * psfParent = NULL;
    150    IExtractIcon * pei = NULL;
     151   IExtractIconA * pei = NULL;
    151152   LPITEMIDLIST   pidlLast = NULL, pidl = NULL;
    152153   HRESULT hr = S_OK;
     
    160161   if ((flags & SHGFI_USEFILEATTRIBUTES) && (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL)))
    161162     return FALSE;
    162 
     163 
     164   /* windows initializes this values regardless of the flags */
     165   psfi->szDisplayName[0] = '\0';
     166   psfi->szTypeName[0] = '\0';
     167   psfi->iIcon = 0;
     168 
    163169   /* translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES in not specified
    164170      the pidl functions fail on not existing file names */
     
    236242     if (SUCCEEDED(hr))
    237243     {
    238        hr = IExtractIconA_GetIconLocation(pei, 0, szLoaction, MAX_PATH, &iIndex, &uFlags);
     244       hr = IExtractIconA_GetIconLocation(pei, (flags & SHGFI_OPENICON) ? GIL_OPENICON : 0, szLoaction, MAX_PATH, &iIndex, &uFlags);
    239245       /* fixme what to do with the index? */
    240246
     
    278284     else
    279285     {
    280        if (!(PidlToSicIndex(psfParent, pidlLast, (flags && SHGFI_LARGEICON), (PUINT)&(psfi->iIcon))))
     286       if (!(PidlToSicIndex(psfParent, pidlLast, (flags && SHGFI_LARGEICON),
     287                            (flags & SHGFI_OPENICON) ? GIL_OPENICON : 0, (PUINT)&(psfi->iIcon))))
    281288       {
    282289         ret = FALSE;
     
    285292     if (ret)
    286293     {
    287        ret = (DWORD) ((flags && SHGFI_LARGEICON) ? ShellBigIconList : ShellSmallIconList);
     294       ret = (DWORD) ((flags & SHGFI_LARGEICON) ? ShellBigIconList : ShellSmallIconList);
    288295     }
    289296   }
     
    512519 */
    513520
    514 ODINFUNCTION1(DWORD, SHLoadInProc, DWORD, dwArg1)
    515 {
    516   CLSID *id;
    517 
     521ODINFUNCTION1(DWORD, SHLoadInProc, REFCLSID, rclsid)
     522{
    518523  dprintf(("SHELL32: SHLoadInProc\n"));
    519 
    520   CLSIDFromString((LPCOLESTR) dwArg1, id);
    521   if (S_OK==SHCoCreateInstance( (LPSTR) dwArg1, id, NULL, &IID_IUnknown, NULL) )
    522         return NOERROR;
     524 
     525  IUnknown *pUnk = NULL;
     526  CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (LPVOID*)pUnk);
     527  if (pUnk)
     528  {
     529    IUnknown_Release(pUnk);
     530    return NOERROR;
     531  }
    523532  return DISP_E_MEMBERNOTFOUND;
    524533}
     
    949958HICON (WINAPI *pCreateIconFromResourceEx)(LPBYTE bits,UINT cbSize, BOOL bIcon, DWORD dwVersion, INT width, INT height,UINT cFlag);
    950959
    951 /* ole2 */
    952 HRESULT (WINAPI* pOleInitialize)(LPVOID reserved);
    953 void (WINAPI* pOleUninitialize)(void);
    954 HRESULT (WINAPI* pDoDragDrop)(IDataObject* pDataObject, IDropSource * pDropSource, DWORD dwOKEffect, DWORD *pdwEffect);
    955 HRESULT (WINAPI* pRegisterDragDrop)(HWND hwnd, IDropTarget* pDropTarget);
    956 HRESULT (WINAPI* pRevokeDragDrop)(HWND hwnd);
    957960
    958961static HINSTANCE  hComctl32;
     
    960963static INT     shell32_RefCount = 0;
    961964
    962 INT      shell32_ObjCount = 0;
     965LONG        shell32_ObjCount = 0;
    963966HINSTANCE   shell32_hInstance = 0;
     967HMODULE     huser32 = 0;
    964968HIMAGELIST  ShellSmallIconList = 0;
    965969HIMAGELIST  ShellBigIconList = 0;
Note: See TracChangeset for help on using the changeset viewer.