Ignore:
Timestamp:
Sep 5, 2001, 3:54:53 PM (24 years ago)
Author:
bird
Message:

Added $Id:$ keyword.

File:
1 edited

Legend:

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

    r6502 r6650  
     1/* $Id: shelllink.c,v 1.8 2001-09-05 13:46:57 bird Exp $ */
    12/*
    23 *
    3  *      Copyright 1997  Marcus Meissner
    4  *      Copyright 1998  Juergen Schmied
     4 *  Copyright 1997  Marcus Meissner
     5 *  Copyright 1998  Juergen Schmied
    56 *
    67 */
     
    5758
    5859/* flag1: lnk elements: simple link has 0x0B */
    59 #define WORKDIR         0x10
    60 #define ARGUMENT        0x20
    61 #define ICON            0x40
    62 #define UNC             0x80
     60#define WORKDIR     0x10
     61#define ARGUMENT    0x20
     62#define ICON        0x40
     63#define UNC     0x80
    6364
    6465/* fStartup */
    65 #define NORMAL          0x01
    66 #define MAXIMIZED       0x03
    67 #define MINIMIZED       0x07
    68 
    69 typedef struct _LINK_HEADER     
    70 {       DWORD   MagicStr;       /* 0x00 'L','\0','\0','\0' */
    71         GUID    MagicGuid;      /* 0x04 is CLSID_ShellLink */
    72         DWORD   Flag1;          /* 0x14 describes elements following */
    73         DWORD   Flag2;          /* 0x18 */
    74         FILETIME Time1;         /* 0x1c */
    75         FILETIME Time2;         /* 0x24 */
    76         FILETIME Time3;         /* 0x2c */
    77         DWORD   Unknown1;       /* 0x34 */
    78         DWORD   Unknown2;       /* 0x38 icon number */
    79         DWORD   fStartup;       /* 0x3c startup type */
    80         DWORD   wHotKey;        /* 0x40 hotkey */
    81         DWORD   Unknown5;       /* 0x44 */
    82         DWORD   Unknown6;       /* 0x48 */
    83         USHORT  PidlSize;       /* 0x4c */
    84         ITEMIDLIST Pidl;        /* 0x4e */
     66#define NORMAL      0x01
     67#define MAXIMIZED   0x03
     68#define MINIMIZED   0x07
     69
     70typedef struct _LINK_HEADER
     71{   DWORD   MagicStr;   /* 0x00 'L','\0','\0','\0' */
     72    GUID    MagicGuid;  /* 0x04 is CLSID_ShellLink */
     73    DWORD   Flag1;      /* 0x14 describes elements following */
     74    DWORD   Flag2;      /* 0x18 */
     75    FILETIME Time1;     /* 0x1c */
     76    FILETIME Time2;     /* 0x24 */
     77    FILETIME Time3;     /* 0x2c */
     78    DWORD   Unknown1;   /* 0x34 */
     79    DWORD   Unknown2;   /* 0x38 icon number */
     80    DWORD   fStartup;   /* 0x3c startup type */
     81    DWORD   wHotKey;    /* 0x40 hotkey */
     82    DWORD   Unknown5;   /* 0x44 */
     83    DWORD   Unknown6;   /* 0x48 */
     84    USHORT  PidlSize;   /* 0x4c */
     85    ITEMIDLIST Pidl;    /* 0x4e */
    8586} LINK_HEADER, * PLINK_HEADER;
    8687
     
    8990typedef struct
    9091{
    91         BYTE bWidth;
    92         BYTE bHeight;
    93         BYTE bColorCount;
    94         BYTE bReserved;
    95         WORD wPlanes;
    96         WORD wBitCount;
    97         DWORD dwBytesInRes;
    98         WORD nID;
     92    BYTE bWidth;
     93    BYTE bHeight;
     94    BYTE bColorCount;
     95    BYTE bReserved;
     96    WORD wPlanes;
     97    WORD wBitCount;
     98    DWORD dwBytesInRes;
     99    WORD nID;
    99100} GRPICONDIRENTRY;
    100101
    101102typedef struct
    102103{
    103         WORD idReserved;
    104         WORD idType;
    105         WORD idCount;
    106         GRPICONDIRENTRY idEntries[1];
     104    WORD idReserved;
     105    WORD idType;
     106    WORD idCount;
     107    GRPICONDIRENTRY idEntries[1];
    107108} GRPICONDIR;
    108109
    109110typedef struct
    110111{
    111         BYTE bWidth;
    112         BYTE bHeight;
    113         BYTE bColorCount;
    114         BYTE bReserved;
    115         WORD wPlanes;
    116         WORD wBitCount;
    117         DWORD dwBytesInRes;
    118         DWORD dwImageOffset;
     112    BYTE bWidth;
     113    BYTE bHeight;
     114    BYTE bColorCount;
     115    BYTE bReserved;
     116    WORD wPlanes;
     117    WORD wBitCount;
     118    DWORD dwBytesInRes;
     119    DWORD dwImageOffset;
    119120} ICONDIRENTRY;
    120121
    121122typedef struct
    122123{
    123         WORD idReserved;
    124         WORD idType;
    125         WORD idCount;
     124    WORD idReserved;
     125    WORD idType;
     126    WORD idCount;
    126127} ICONDIR;
    127128
     
    130131
    131132
    132 static ICOM_VTABLE(IShellLinkA)         slvt;
    133 static ICOM_VTABLE(IShellLinkW)         slvtw;
    134 static ICOM_VTABLE(IPersistFile)        pfvt;
    135 static ICOM_VTABLE(IPersistStream)      psvt;
     133static ICOM_VTABLE(IShellLinkA)     slvt;
     134static ICOM_VTABLE(IShellLinkW)     slvtw;
     135static ICOM_VTABLE(IPersistFile)    pfvt;
     136static ICOM_VTABLE(IPersistStream)  psvt;
    136137
    137138/* IShellLink Implementation */
     
    139140typedef struct
    140141{
    141         ICOM_VFIELD(IShellLinkA);
    142         DWORD                           ref;
    143 
    144         ICOM_VTABLE(IShellLinkW)*       lpvtblw;
    145         ICOM_VTABLE(IPersistFile)*      lpvtblPersistFile;
    146         ICOM_VTABLE(IPersistStream)*    lpvtblPersistStream;
    147        
    148         /* internal stream of the IPersistFile interface */
    149         IStream*                        lpFileStream;
    150        
    151         /* data structures according to the informations in the lnk */
    152         LPSTR           sPath;
    153         LPITEMIDLIST    pPidl;
    154         WORD            wHotKey;
    155         SYSTEMTIME      time1;
    156         SYSTEMTIME      time2;
    157         SYSTEMTIME      time3;
    158 
    159         LPSTR           sIcoPath;
    160         INT             iIcoNdx;
    161         LPSTR           sArgs;
    162         LPSTR           sWorkDir;
    163         LPSTR           sDescription;
     142    ICOM_VFIELD(IShellLinkA);
     143    DWORD               ref;
     144
     145    ICOM_VTABLE(IShellLinkW)*   lpvtblw;
     146    ICOM_VTABLE(IPersistFile)*  lpvtblPersistFile;
     147    ICOM_VTABLE(IPersistStream)*    lpvtblPersistStream;
     148
     149    /* internal stream of the IPersistFile interface */
     150    IStream*            lpFileStream;
     151
     152    /* data structures according to the informations in the lnk */
     153    LPSTR       sPath;
     154    LPITEMIDLIST    pPidl;
     155    WORD        wHotKey;
     156    SYSTEMTIME  time1;
     157    SYSTEMTIME  time2;
     158    SYSTEMTIME  time3;
     159
     160    LPSTR       sIcoPath;
     161    INT     iIcoNdx;
     162    LPSTR       sArgs;
     163    LPSTR       sWorkDir;
     164    LPSTR       sDescription;
    164165} IShellLinkImpl;
    165166
     
    178179 */
    179180static HRESULT WINAPI IPersistFile_fnQueryInterface(
    180         IPersistFile* iface,
    181         REFIID riid,
    182         LPVOID *ppvObj)
    183 {
    184         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    185 
    186         TRACE("(%p)\n",This);
    187 
    188         return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
     181    IPersistFile* iface,
     182    REFIID riid,
     183    LPVOID *ppvObj)
     184{
     185    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     186
     187    TRACE("(%p)\n",This);
     188
     189    return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
    189190}
    190191
     
    194195static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface)
    195196{
    196         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    197 
    198         TRACE("(%p)->(count=%lu)\n",This,This->ref);
    199 
    200         return IShellLinkA_AddRef((IShellLinkA*)This);
     197    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     198
     199    TRACE("(%p)->(count=%lu)\n",This,This->ref);
     200
     201    return IShellLinkA_AddRef((IShellLinkA*)This);
    201202}
    202203/******************************************************************************
     
    205206static ULONG WINAPI IPersistFile_fnRelease(IPersistFile* iface)
    206207{
    207         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    208 
    209         TRACE("(%p)->(count=%lu)\n",This,This->ref);
    210 
    211         return IShellLinkA_Release((IShellLinkA*)This);
     208    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     209
     210    TRACE("(%p)->(count=%lu)\n",This,This->ref);
     211
     212    return IShellLinkA_Release((IShellLinkA*)This);
    212213}
    213214
    214215static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile* iface, CLSID *pClassID)
    215216{
    216         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    217         FIXME("(%p)\n",This);
    218         return NOERROR;
     217    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     218    FIXME("(%p)\n",This);
     219    return NOERROR;
    219220}
    220221static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile* iface)
    221222{
    222         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    223         FIXME("(%p)\n",This);
    224         return NOERROR;
     223    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     224    FIXME("(%p)\n",This);
     225    return NOERROR;
    225226}
    226227static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
    227228{
    228         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    229         _IPersistStream_From_ICOM_THIS(IPersistStream, This)
    230 
    231         LPSTR           sFile = HEAP_strdupWtoA ( GetProcessHeap(), 0, pszFileName);
    232         HRESULT         hRet = E_FAIL;
    233 
    234         TRACE("(%p, %s)\n",This, sFile);
    235        
    236 
    237         if (This->lpFileStream)
    238           IStream_Release(This->lpFileStream);
    239        
    240         if SUCCEEDED(CreateStreamOnFile(sFile, &(This->lpFileStream)))
    241         {
    242           if SUCCEEDED (IPersistStream_Load(StreamThis, This->lpFileStream))
    243           {
    244             return NOERROR;
    245           }
    246         }
    247        
    248         return hRet;
     229    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     230    _IPersistStream_From_ICOM_THIS(IPersistStream, This)
     231
     232    LPSTR       sFile = HEAP_strdupWtoA ( GetProcessHeap(), 0, pszFileName);
     233    HRESULT     hRet = E_FAIL;
     234
     235    TRACE("(%p, %s)\n",This, sFile);
     236
     237
     238    if (This->lpFileStream)
     239      IStream_Release(This->lpFileStream);
     240
     241    if SUCCEEDED(CreateStreamOnFile(sFile, &(This->lpFileStream)))
     242    {
     243      if SUCCEEDED (IPersistStream_Load(StreamThis, This->lpFileStream))
     244      {
     245        return NOERROR;
     246      }
     247    }
     248
     249    return hRet;
    249250}
    250251
    251252
    252253#ifdef __WIN32OS2__
    253 static BOOL SaveIconResAsOS2ICO(GRPICONDIR *pIconDir, HINSTANCE hInstance, 
     254static BOOL SaveIconResAsOS2ICO(GRPICONDIR *pIconDir, HINSTANCE hInstance,
    254255                                const char *szXPMFileName)
    255256{
     
    394395#ifdef __WIN32OS2__
    395396        if(!hResInfo) {
    396             hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_ICONA);       
     397            hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_ICONA);
    397398            if(hResInfo) {
    398399                GRPICONDIR icondir = {0};
    399400                BITMAPINFO *bmi;
    400401
    401                 bmi = (BITMAPINFO *)LockResource(LoadResource(hModule, hResInfo));
     402                bmi = (BITMAPINFO *)LockResource(LoadResource(hModule, hResInfo));
    402403
    403404                icondir.idReserved = 0;
     
    684685    tmp[3] = 'O';
    685686    /* extract the icon */
    686     if (!extract_icon( This->sIcoPath && strlen(This->sIcoPath) ? 
     687    if (!extract_icon( This->sIcoPath && strlen(This->sIcoPath) ?
    687688                       This->sIcoPath : This->sPath,
    688689                       icon_name, This->iIcoNdx)) goto done;
     
    690691    if(OSLibWinCreateObject(This->sPath, This->sArgs, This->sWorkDir, filename,
    691692                            This->sDescription, icon_name,
    692                             This->iIcoNdx, bDesktop) == FALSE) 
     693                            This->iIcoNdx, bDesktop) == FALSE)
    693694    {
    694695        ret = E_ACCESSDENIED;
    695696    }
    696    
     697
    697698 done:
    698699    if(shell_link_app) HeapFree( GetProcessHeap(), 0, shell_link_app );
     
    760761
    761762    /* extract the icon */
    762     if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ? 
     763    if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ?
    763764                                      This->sIcoPath : This->sPath,
    764765                                      This->iIcoNdx ))) goto done;
     
    829830static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName)
    830831{
    831         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
    832         FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName));
    833         return NOERROR;
     832    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
     833    FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName));
     834    return NOERROR;
    834835}
    835836static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName)
    836837{
    837         _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
    838         FIXME("(%p)\n",This);
    839         return NOERROR;
    840 }
    841 
    842 static ICOM_VTABLE(IPersistFile) pfvt = 
    843 {
    844         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    845         IPersistFile_fnQueryInterface,
    846         IPersistFile_fnAddRef,
    847         IPersistFile_fnRelease,
    848         IPersistFile_fnGetClassID,
    849         IPersistFile_fnIsDirty,
    850         IPersistFile_fnLoad,
    851         IPersistFile_fnSave,
    852         IPersistFile_fnSaveCompleted,
    853         IPersistFile_fnGetCurFile
     838    _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
     839    FIXME("(%p)\n",This);
     840    return NOERROR;
     841}
     842
     843static ICOM_VTABLE(IPersistFile) pfvt =
     844{
     845    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     846    IPersistFile_fnQueryInterface,
     847    IPersistFile_fnAddRef,
     848    IPersistFile_fnRelease,
     849    IPersistFile_fnGetClassID,
     850    IPersistFile_fnIsDirty,
     851    IPersistFile_fnLoad,
     852    IPersistFile_fnSave,
     853    IPersistFile_fnSaveCompleted,
     854    IPersistFile_fnGetCurFile
    854855};
    855856
     
    858859 */
    859860static HRESULT WINAPI IPersistStream_fnQueryInterface(
    860         IPersistStream* iface,
    861         REFIID     riid,
    862         VOID**     ppvoid)
    863 {
    864         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    865 
    866         TRACE("(%p)\n",This);
    867 
    868         return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvoid);
     861    IPersistStream* iface,
     862    REFIID     riid,
     863    VOID**     ppvoid)
     864{
     865    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     866
     867    TRACE("(%p)\n",This);
     868
     869    return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvoid);
    869870}
    870871
     
    873874 */
    874875static ULONG WINAPI IPersistStream_fnRelease(
    875         IPersistStream* iface)
    876 {
    877         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    878 
    879         TRACE("(%p)\n",This);
    880 
    881         return IShellLinkA_Release((IShellLinkA*)This);
     876    IPersistStream* iface)
     877{
     878    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     879
     880    TRACE("(%p)\n",This);
     881
     882    return IShellLinkA_Release((IShellLinkA*)This);
    882883}
    883884
     
    886887 */
    887888static ULONG WINAPI IPersistStream_fnAddRef(
    888         IPersistStream* iface)
    889 {
    890         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    891 
    892         TRACE("(%p)\n",This);
    893 
    894         return IShellLinkA_AddRef((IShellLinkA*)This);
    895 } 
     889    IPersistStream* iface)
     890{
     891    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     892
     893    TRACE("(%p)\n",This);
     894
     895    return IShellLinkA_AddRef((IShellLinkA*)This);
     896}
    896897
    897898/************************************************************************
     
    900901 */
    901902static HRESULT WINAPI IPersistStream_fnGetClassID(
    902         IPersistStream* iface,
    903         CLSID* pClassID)
    904 {
    905         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    906 
    907         TRACE("(%p)\n", This);
    908 
    909         if (pClassID==0)
    910           return E_POINTER;
    911 
    912 /*      memcpy(pClassID, &CLSID_???, sizeof(CLSID_???)); */
    913 
    914         return S_OK;
     903    IPersistStream* iface,
     904    CLSID* pClassID)
     905{
     906    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     907
     908    TRACE("(%p)\n", This);
     909
     910    if (pClassID==0)
     911      return E_POINTER;
     912
     913/*  memcpy(pClassID, &CLSID_???, sizeof(CLSID_???)); */
     914
     915    return S_OK;
    915916}
    916917
     
    919920 */
    920921static HRESULT WINAPI IPersistStream_fnIsDirty(
    921         IPersistStream*  iface)
    922 {
    923         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    924 
    925         TRACE("(%p)\n", This);
    926 
    927         return S_OK;
     922    IPersistStream*  iface)
     923{
     924    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     925
     926    TRACE("(%p)\n", This);
     927
     928    return S_OK;
    928929}
    929930/************************************************************************
     
    932933
    933934static HRESULT WINAPI IPersistStream_fnLoad(
    934         IPersistStream*  iface,
    935         IStream*         pLoadStream)
    936 {
    937         PLINK_HEADER lpLinkHeader = HeapAlloc(GetProcessHeap(), 0, LINK_HEADER_SIZE);
    938         ULONG   dwBytesRead;
    939         DWORD   ret = E_FAIL;
    940         char    sTemp[MAX_PATH];
    941        
    942         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    943 
    944         TRACE("(%p)(%p)\n", This, pLoadStream);
    945 
    946         if ( ! pLoadStream)
    947         {
    948           return STG_E_INVALIDPOINTER;
    949         }
    950        
    951         IStream_AddRef (pLoadStream);
    952         if(lpLinkHeader)
    953         {
    954           if (SUCCEEDED(IStream_Read(pLoadStream, lpLinkHeader, LINK_HEADER_SIZE, &dwBytesRead)))
    955           {
    956             if ((lpLinkHeader->MagicStr == 0x0000004CL) && IsEqualIID(&lpLinkHeader->MagicGuid, &CLSID_ShellLink))
    957             {
    958               lpLinkHeader = HeapReAlloc(GetProcessHeap(), 0, lpLinkHeader, LINK_HEADER_SIZE+lpLinkHeader->PidlSize);
    959               if (lpLinkHeader)
    960               {
    961                 if (SUCCEEDED(IStream_Read(pLoadStream, &(lpLinkHeader->Pidl), lpLinkHeader->PidlSize, &dwBytesRead)))
    962                 {
    963                   if (pcheck (&lpLinkHeader->Pidl))
    964                   {     
    965                     This->pPidl = ILClone (&lpLinkHeader->Pidl);
    966 
    967                     SHGetPathFromIDListA(&lpLinkHeader->Pidl, sTemp);
    968                     This->sPath = HEAP_strdupA ( GetProcessHeap(), 0, sTemp);
    969                   }
    970                   This->wHotKey = lpLinkHeader->wHotKey;
    971                   FileTimeToSystemTime (&lpLinkHeader->Time1, &This->time1);
    972                   FileTimeToSystemTime (&lpLinkHeader->Time2, &This->time2);
    973                   FileTimeToSystemTime (&lpLinkHeader->Time3, &This->time3);
     935    IPersistStream*  iface,
     936    IStream*         pLoadStream)
     937{
     938    PLINK_HEADER lpLinkHeader = HeapAlloc(GetProcessHeap(), 0, LINK_HEADER_SIZE);
     939    ULONG   dwBytesRead;
     940    DWORD   ret = E_FAIL;
     941    char    sTemp[MAX_PATH];
     942
     943    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     944
     945    TRACE("(%p)(%p)\n", This, pLoadStream);
     946
     947    if ( ! pLoadStream)
     948    {
     949      return STG_E_INVALIDPOINTER;
     950    }
     951
     952    IStream_AddRef (pLoadStream);
     953    if(lpLinkHeader)
     954    {
     955      if (SUCCEEDED(IStream_Read(pLoadStream, lpLinkHeader, LINK_HEADER_SIZE, &dwBytesRead)))
     956      {
     957        if ((lpLinkHeader->MagicStr == 0x0000004CL) && IsEqualIID(&lpLinkHeader->MagicGuid, &CLSID_ShellLink))
     958        {
     959          lpLinkHeader = HeapReAlloc(GetProcessHeap(), 0, lpLinkHeader, LINK_HEADER_SIZE+lpLinkHeader->PidlSize);
     960          if (lpLinkHeader)
     961          {
     962            if (SUCCEEDED(IStream_Read(pLoadStream, &(lpLinkHeader->Pidl), lpLinkHeader->PidlSize, &dwBytesRead)))
     963            {
     964              if (pcheck (&lpLinkHeader->Pidl))
     965              {
     966                This->pPidl = ILClone (&lpLinkHeader->Pidl);
     967
     968                SHGetPathFromIDListA(&lpLinkHeader->Pidl, sTemp);
     969                This->sPath = HEAP_strdupA ( GetProcessHeap(), 0, sTemp);
     970              }
     971          This->wHotKey = lpLinkHeader->wHotKey;
     972          FileTimeToSystemTime (&lpLinkHeader->Time1, &This->time1);
     973          FileTimeToSystemTime (&lpLinkHeader->Time2, &This->time2);
     974          FileTimeToSystemTime (&lpLinkHeader->Time3, &This->time3);
    974975#if 1
    975                   GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time1, NULL, sTemp, 256);
    976                   TRACE("-- time1: %s\n", sTemp);
    977                   GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time2, NULL, sTemp, 256);
    978                   TRACE("-- time1: %s\n", sTemp);
    979                   GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time3, NULL, sTemp, 256);
    980                   TRACE("-- time1: %s\n", sTemp);
    981                   pdump (This->pPidl);
    982 #endif           
    983                   ret = S_OK;
    984                 }
    985               }
    986             }
    987             else
    988             {
    989               WARN("stream contains no link!\n");
    990             }
    991           }
    992         }
    993 
    994         IStream_Release (pLoadStream);
    995 
    996         pdump(This->pPidl);
    997        
    998         HeapFree(GetProcessHeap(), 0, lpLinkHeader);
    999 
    1000         return ret;
     976          GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time1, NULL, sTemp, 256);
     977          TRACE("-- time1: %s\n", sTemp);
     978          GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time2, NULL, sTemp, 256);
     979          TRACE("-- time1: %s\n", sTemp);
     980          GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time3, NULL, sTemp, 256);
     981          TRACE("-- time1: %s\n", sTemp);
     982          pdump (This->pPidl);
     983#endif
     984          ret = S_OK;
     985            }
     986          }
     987        }
     988        else
     989        {
     990          WARN("stream contains no link!\n");
     991        }
     992      }
     993    }
     994
     995    IStream_Release (pLoadStream);
     996
     997    pdump(This->pPidl);
     998
     999    HeapFree(GetProcessHeap(), 0, lpLinkHeader);
     1000
     1001    return ret;
    10011002}
    10021003
     
    10051006 */
    10061007static HRESULT WINAPI IPersistStream_fnSave(
    1007         IPersistStream*  iface,
    1008         IStream*         pOutStream,
    1009         BOOL             fClearDirty)
    1010 {
    1011         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    1012        
    1013         TRACE("(%p) %p %x\n", This, pOutStream, fClearDirty);
    1014 
    1015         return E_NOTIMPL;
     1008    IPersistStream*  iface,
     1009    IStream*         pOutStream,
     1010    BOOL             fClearDirty)
     1011{
     1012    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     1013
     1014    TRACE("(%p) %p %x\n", This, pOutStream, fClearDirty);
     1015
     1016    return E_NOTIMPL;
    10161017}
    10171018
     
    10201021 */
    10211022static HRESULT WINAPI IPersistStream_fnGetSizeMax(
    1022         IPersistStream*  iface,
    1023         ULARGE_INTEGER*  pcbSize)
    1024 {
    1025         _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    1026        
    1027         TRACE("(%p)\n", This);
    1028 
    1029         return E_NOTIMPL;
     1023    IPersistStream*  iface,
     1024    ULARGE_INTEGER*  pcbSize)
     1025{
     1026    _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     1027
     1028    TRACE("(%p)\n", This);
     1029
     1030    return E_NOTIMPL;
    10301031}
    10311032
    10321033static ICOM_VTABLE(IPersistStream) psvt =
    10331034{
    1034         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    1035         IPersistStream_fnQueryInterface,
    1036         IPersistStream_fnAddRef,
    1037         IPersistStream_fnRelease,
    1038         IPersistStream_fnGetClassID,
    1039         IPersistStream_fnIsDirty,
    1040         IPersistStream_fnLoad,
    1041         IPersistStream_fnSave,
    1042         IPersistStream_fnGetSizeMax
     1035    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     1036    IPersistStream_fnQueryInterface,
     1037    IPersistStream_fnAddRef,
     1038    IPersistStream_fnRelease,
     1039    IPersistStream_fnGetClassID,
     1040    IPersistStream_fnIsDirty,
     1041    IPersistStream_fnLoad,
     1042    IPersistStream_fnSave,
     1043    IPersistStream_fnGetSizeMax
    10431044};
    10441045
    10451046/**************************************************************************
    1046  *        IShellLink_Constructor
    1047  */
    1048 IShellLinkA * IShellLink_Constructor(BOOL bUnicode) 
    1049 {       IShellLinkImpl * sl;
    1050 
    1051         sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl));
    1052         sl->ref = 1;
    1053         ICOM_VTBL(sl) = &slvt;
    1054         sl->lpvtblw = &slvtw;
    1055         sl->lpvtblPersistFile = &pfvt;
    1056         sl->lpvtblPersistStream = &psvt;
    1057        
    1058         TRACE("(%p)->()\n",sl);
    1059         shell32_ObjCount++;
    1060         return bUnicode ? (IShellLinkA *) &(sl->lpvtblw) : (IShellLinkA *)sl;
     1047 *    IShellLink_Constructor
     1048 */
     1049IShellLinkA * IShellLink_Constructor(BOOL bUnicode)
     1050{   IShellLinkImpl * sl;
     1051
     1052    sl = (IShellLinkImpl *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellLinkImpl));
     1053    sl->ref = 1;
     1054    ICOM_VTBL(sl) = &slvt;
     1055    sl->lpvtblw = &slvtw;
     1056    sl->lpvtblPersistFile = &pfvt;
     1057    sl->lpvtblPersistStream = &psvt;
     1058
     1059    TRACE("(%p)->()\n",sl);
     1060    shell32_ObjCount++;
     1061    return bUnicode ? (IShellLinkA *) &(sl->lpvtblw) : (IShellLinkA *)sl;
    10611062}
    10621063
     
    10661067static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid,  LPVOID *ppvObj)
    10671068{
    1068         ICOM_THIS(IShellLinkImpl, iface);
    1069        
    1070         TRACE("(%p)->(\n\tIID:\t%s)\n",This,debugstr_guid(riid));
    1071 
    1072         *ppvObj = NULL;
    1073 
    1074         if(IsEqualIID(riid, &IID_IUnknown) ||
    1075            IsEqualIID(riid, &IID_IShellLinkA))
    1076         {
    1077           *ppvObj = This;
    1078         }   
    1079         else if(IsEqualIID(riid, &IID_IShellLinkW))
    1080         {
    1081           *ppvObj = (IShellLinkW *)&(This->lpvtblw);
    1082         }   
    1083         else if(IsEqualIID(riid, &IID_IPersistFile))
    1084         {
    1085           *ppvObj = (IPersistFile *)&(This->lpvtblPersistFile);
    1086         }
    1087         else if(IsEqualIID(riid, &IID_IPersistStream))
    1088         {
    1089           *ppvObj = (IPersistStream *)&(This->lpvtblPersistStream);
    1090         }   
    1091 
    1092         if(*ppvObj)
    1093         {
    1094           IUnknown_AddRef((IUnknown*)(*ppvObj));
    1095           TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
    1096           return S_OK;
    1097         }
    1098         TRACE("-- Interface: E_NOINTERFACE\n");
    1099         return E_NOINTERFACE;
    1100 } 
     1069    ICOM_THIS(IShellLinkImpl, iface);
     1070
     1071    TRACE("(%p)->(\n\tIID:\t%s)\n",This,debugstr_guid(riid));
     1072
     1073    *ppvObj = NULL;
     1074
     1075    if(IsEqualIID(riid, &IID_IUnknown) ||
     1076       IsEqualIID(riid, &IID_IShellLinkA))
     1077    {
     1078      *ppvObj = This;
     1079    }
     1080    else if(IsEqualIID(riid, &IID_IShellLinkW))
     1081    {
     1082      *ppvObj = (IShellLinkW *)&(This->lpvtblw);
     1083    }
     1084    else if(IsEqualIID(riid, &IID_IPersistFile))
     1085    {
     1086      *ppvObj = (IPersistFile *)&(This->lpvtblPersistFile);
     1087    }
     1088    else if(IsEqualIID(riid, &IID_IPersistStream))
     1089    {
     1090      *ppvObj = (IPersistStream *)&(This->lpvtblPersistStream);
     1091    }
     1092
     1093    if(*ppvObj)
     1094    {
     1095      IUnknown_AddRef((IUnknown*)(*ppvObj));
     1096      TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
     1097      return S_OK;
     1098    }
     1099    TRACE("-- Interface: E_NOINTERFACE\n");
     1100    return E_NOINTERFACE;
     1101}
    11011102/******************************************************************************
    11021103 * IShellLinkA_AddRef
     
    11041105static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface)
    11051106{
    1106         ICOM_THIS(IShellLinkImpl, iface);
    1107        
    1108         TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1109 
    1110         shell32_ObjCount++;
    1111         return ++(This->ref);
     1107    ICOM_THIS(IShellLinkImpl, iface);
     1108
     1109    TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1110
     1111    shell32_ObjCount++;
     1112    return ++(This->ref);
    11121113}
    11131114/******************************************************************************
    1114  *      IShellLinkA_Release
     1115 *  IShellLinkA_Release
    11151116 */
    11161117static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface)
    11171118{
    1118         ICOM_THIS(IShellLinkImpl, iface);
    1119        
    1120         TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1121 
    1122         shell32_ObjCount--;
    1123         if (!--(This->ref))
    1124         { TRACE("-- destroying IShellLink(%p)\n",This);
    1125        
    1126           if (This->sIcoPath)
    1127             HeapFree(GetProcessHeap(), 0, This->sIcoPath);
    1128            
    1129           if (This->sArgs)
    1130             HeapFree(GetProcessHeap(), 0, This->sArgs);
    1131 
    1132           if (This->sWorkDir)
    1133             HeapFree(GetProcessHeap(), 0, This->sWorkDir);
    1134            
    1135           if (This->sDescription)
    1136             HeapFree(GetProcessHeap(), 0, This->sDescription);
    1137 
    1138           if (This->sPath)
    1139             HeapFree(GetProcessHeap(),0,This->sPath);
    1140 
    1141           if (This->pPidl)
    1142             SHFree(This->pPidl);
    1143 
    1144           if (This->lpFileStream)
    1145             IStream_Release(This->lpFileStream);
    1146        
    1147           This->iIcoNdx = 0;
    1148 
    1149           HeapFree(GetProcessHeap(),0,This);
    1150           return 0;
    1151         }
    1152         return This->ref;
     1119    ICOM_THIS(IShellLinkImpl, iface);
     1120
     1121    TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1122
     1123    shell32_ObjCount--;
     1124    if (!--(This->ref))
     1125    { TRACE("-- destroying IShellLink(%p)\n",This);
     1126
     1127      if (This->sIcoPath)
     1128        HeapFree(GetProcessHeap(), 0, This->sIcoPath);
     1129
     1130      if (This->sArgs)
     1131        HeapFree(GetProcessHeap(), 0, This->sArgs);
     1132
     1133      if (This->sWorkDir)
     1134        HeapFree(GetProcessHeap(), 0, This->sWorkDir);
     1135
     1136      if (This->sDescription)
     1137        HeapFree(GetProcessHeap(), 0, This->sDescription);
     1138
     1139      if (This->sPath)
     1140        HeapFree(GetProcessHeap(),0,This->sPath);
     1141
     1142      if (This->pPidl)
     1143        SHFree(This->pPidl);
     1144
     1145      if (This->lpFileStream)
     1146        IStream_Release(This->lpFileStream);
     1147
     1148      This->iIcoNdx = 0;
     1149
     1150      HeapFree(GetProcessHeap(),0,This);
     1151      return 0;
     1152    }
     1153    return This->ref;
    11531154}
    11541155
    11551156static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
    11561157{
    1157         ICOM_THIS(IShellLinkImpl, iface);
    1158        
    1159         TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)(%s)\n",This, pszFile, cchMaxPath, pfd, fFlags, debugstr_a(This->sPath));
    1160 
    1161         if (This->sPath)
    1162           lstrcpynA(pszFile,This->sPath, cchMaxPath);
    1163         else
    1164           return E_FAIL;
    1165 
    1166         return NOERROR;
     1158    ICOM_THIS(IShellLinkImpl, iface);
     1159
     1160    TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)(%s)\n",This, pszFile, cchMaxPath, pfd, fFlags, debugstr_a(This->sPath));
     1161
     1162    if (This->sPath)
     1163      lstrcpynA(pszFile,This->sPath, cchMaxPath);
     1164    else
     1165      return E_FAIL;
     1166
     1167    return NOERROR;
    11671168}
    11681169static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl)
    11691170{
    1170         ICOM_THIS(IShellLinkImpl, iface);
    1171        
    1172         TRACE("(%p)->(ppidl=%p)\n",This, ppidl);
    1173 
    1174         *ppidl = ILClone(This->pPidl);
    1175         return NOERROR;
     1171    ICOM_THIS(IShellLinkImpl, iface);
     1172
     1173    TRACE("(%p)->(ppidl=%p)\n",This, ppidl);
     1174
     1175    *ppidl = ILClone(This->pPidl);
     1176    return NOERROR;
    11761177}
    11771178static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl)
    11781179{
    1179         ICOM_THIS(IShellLinkImpl, iface);
    1180        
    1181         TRACE("(%p)->(pidl=%p)\n",This, pidl);
    1182 
    1183         if (This->pPidl)
    1184             SHFree(This->pPidl);
    1185         This->pPidl = ILClone (pidl);
    1186         return NOERROR;
     1180    ICOM_THIS(IShellLinkImpl, iface);
     1181
     1182    TRACE("(%p)->(pidl=%p)\n",This, pidl);
     1183
     1184    if (This->pPidl)
     1185        SHFree(This->pPidl);
     1186    This->pPidl = ILClone (pidl);
     1187    return NOERROR;
    11871188}
    11881189static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName)
    11891190{
    1190         ICOM_THIS(IShellLinkImpl, iface);
    1191        
    1192         FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
    1193         lstrcpynA(pszName,"Description, FIXME",cchMaxName);
    1194         return NOERROR;
     1191    ICOM_THIS(IShellLinkImpl, iface);
     1192
     1193    FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
     1194    lstrcpynA(pszName,"Description, FIXME",cchMaxName);
     1195    return NOERROR;
    11951196}
    11961197static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName)
    11971198{
    1198         ICOM_THIS(IShellLinkImpl, iface);
    1199        
    1200         TRACE("(%p)->(pName=%s)\n", This, pszName);
    1201 
    1202         if (This->sDescription)
    1203             HeapFree(GetProcessHeap(), 0, This->sDescription);
    1204         if (!(This->sDescription = HEAP_strdupA(GetProcessHeap(), 0, pszName)))
    1205             return E_OUTOFMEMORY;
    1206 
    1207         return NOERROR;
     1199    ICOM_THIS(IShellLinkImpl, iface);
     1200
     1201    TRACE("(%p)->(pName=%s)\n", This, pszName);
     1202
     1203    if (This->sDescription)
     1204        HeapFree(GetProcessHeap(), 0, This->sDescription);
     1205    if (!(This->sDescription = HEAP_strdupA(GetProcessHeap(), 0, pszName)))
     1206        return E_OUTOFMEMORY;
     1207
     1208    return NOERROR;
    12081209}
    12091210static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath)
    12101211{
    1211         ICOM_THIS(IShellLinkImpl, iface);
    1212        
    1213         TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath);
    1214 
    1215         lstrcpynA( pszDir, This->sWorkDir ? This->sWorkDir : "", cchMaxPath );
    1216 
    1217         return NOERROR;
     1212    ICOM_THIS(IShellLinkImpl, iface);
     1213
     1214    TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath);
     1215
     1216    lstrcpynA( pszDir, This->sWorkDir ? This->sWorkDir : "", cchMaxPath );
     1217
     1218    return NOERROR;
    12181219}
    12191220static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir)
    12201221{
    1221         ICOM_THIS(IShellLinkImpl, iface);
    1222        
    1223         TRACE("(%p)->(dir=%s)\n",This, pszDir);
    1224 
    1225         if (This->sWorkDir)
    1226             HeapFree(GetProcessHeap(), 0, This->sWorkDir);
    1227         if (!(This->sWorkDir = HEAP_strdupA(GetProcessHeap(), 0, pszDir)))
    1228             return E_OUTOFMEMORY;
    1229 
    1230         return NOERROR;
     1222    ICOM_THIS(IShellLinkImpl, iface);
     1223
     1224    TRACE("(%p)->(dir=%s)\n",This, pszDir);
     1225
     1226    if (This->sWorkDir)
     1227        HeapFree(GetProcessHeap(), 0, This->sWorkDir);
     1228    if (!(This->sWorkDir = HEAP_strdupA(GetProcessHeap(), 0, pszDir)))
     1229        return E_OUTOFMEMORY;
     1230
     1231    return NOERROR;
    12311232}
    12321233static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath)
    12331234{
    1234         ICOM_THIS(IShellLinkImpl, iface);
    1235        
    1236         TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath);
    1237 
    1238         lstrcpynA( pszArgs, This->sArgs ? This->sArgs : "", cchMaxPath );
    1239 
    1240         return NOERROR;
     1235    ICOM_THIS(IShellLinkImpl, iface);
     1236
     1237    TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath);
     1238
     1239    lstrcpynA( pszArgs, This->sArgs ? This->sArgs : "", cchMaxPath );
     1240
     1241    return NOERROR;
    12411242}
    12421243static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs)
    12431244{
    1244         ICOM_THIS(IShellLinkImpl, iface);
    1245        
    1246         TRACE("(%p)->(args=%s)\n",This, pszArgs);
    1247 
    1248         if (This->sArgs)
    1249             HeapFree(GetProcessHeap(), 0, This->sArgs);
    1250         if (!(This->sArgs = HEAP_strdupA(GetProcessHeap(), 0, pszArgs)))
    1251             return E_OUTOFMEMORY;
    1252 
    1253         return NOERROR;
     1245    ICOM_THIS(IShellLinkImpl, iface);
     1246
     1247    TRACE("(%p)->(args=%s)\n",This, pszArgs);
     1248
     1249    if (This->sArgs)
     1250        HeapFree(GetProcessHeap(), 0, This->sArgs);
     1251    if (!(This->sArgs = HEAP_strdupA(GetProcessHeap(), 0, pszArgs)))
     1252        return E_OUTOFMEMORY;
     1253
     1254    return NOERROR;
    12541255}
    12551256static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey)
    12561257{
    1257         ICOM_THIS(IShellLinkImpl, iface);
    1258        
    1259         TRACE("(%p)->(%p)(0x%08x)\n",This, pwHotkey, This->wHotKey);
    1260 
    1261         *pwHotkey = This->wHotKey;
    1262 
    1263         return NOERROR;
     1258    ICOM_THIS(IShellLinkImpl, iface);
     1259
     1260    TRACE("(%p)->(%p)(0x%08x)\n",This, pwHotkey, This->wHotKey);
     1261
     1262    *pwHotkey = This->wHotKey;
     1263
     1264    return NOERROR;
    12641265}
    12651266static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey)
    12661267{
    1267         ICOM_THIS(IShellLinkImpl, iface);
    1268        
    1269         TRACE("(%p)->(hotkey=%x)\n",This, wHotkey);
    1270        
    1271         This->wHotKey = wHotkey;
    1272 
    1273         return NOERROR;
     1268    ICOM_THIS(IShellLinkImpl, iface);
     1269
     1270    TRACE("(%p)->(hotkey=%x)\n",This, wHotkey);
     1271
     1272    This->wHotKey = wHotkey;
     1273
     1274    return NOERROR;
    12741275}
    12751276static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd)
    12761277{
    1277         ICOM_THIS(IShellLinkImpl, iface);
    1278        
    1279         FIXME("(%p)->(%p)\n",This, piShowCmd);
    1280         *piShowCmd=0;
    1281         return NOERROR;
     1278    ICOM_THIS(IShellLinkImpl, iface);
     1279
     1280    FIXME("(%p)->(%p)\n",This, piShowCmd);
     1281    *piShowCmd=0;
     1282    return NOERROR;
    12821283}
    12831284static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd)
    12841285{
    1285         ICOM_THIS(IShellLinkImpl, iface);
    1286        
    1287         FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
    1288         return NOERROR;
     1286    ICOM_THIS(IShellLinkImpl, iface);
     1287
     1288    FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
     1289    return NOERROR;
    12891290}
    12901291static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
    12911292{
    1292         ICOM_THIS(IShellLinkImpl, iface);
    1293        
    1294         TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
    1295 
    1296         lstrcpynA( pszIconPath, This->sIcoPath ? This->sIcoPath : "", cchIconPath );
    1297         *piIcon = This->iIcoNdx;
    1298 
    1299         return NOERROR;
     1293    ICOM_THIS(IShellLinkImpl, iface);
     1294
     1295    TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
     1296
     1297    lstrcpynA( pszIconPath, This->sIcoPath ? This->sIcoPath : "", cchIconPath );
     1298    *piIcon = This->iIcoNdx;
     1299
     1300    return NOERROR;
    13001301}
    13011302static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon)
    13021303{
    1303         ICOM_THIS(IShellLinkImpl, iface);
    1304        
    1305         TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon);
    1306        
    1307         if (This->sIcoPath)
    1308             HeapFree(GetProcessHeap(), 0, This->sIcoPath);
    1309         if (!(This->sIcoPath = HEAP_strdupA(GetProcessHeap(), 0, pszIconPath)))
    1310             return E_OUTOFMEMORY;       
    1311         This->iIcoNdx = iIcon;
    1312        
    1313         return NOERROR;
     1304    ICOM_THIS(IShellLinkImpl, iface);
     1305
     1306    TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon);
     1307
     1308    if (This->sIcoPath)
     1309        HeapFree(GetProcessHeap(), 0, This->sIcoPath);
     1310    if (!(This->sIcoPath = HEAP_strdupA(GetProcessHeap(), 0, pszIconPath)))
     1311        return E_OUTOFMEMORY;
     1312    This->iIcoNdx = iIcon;
     1313
     1314    return NOERROR;
    13141315}
    13151316static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved)
    13161317{
    1317         ICOM_THIS(IShellLinkImpl, iface);
    1318        
    1319         FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
    1320         return NOERROR;
     1318    ICOM_THIS(IShellLinkImpl, iface);
     1319
     1320    FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
     1321    return NOERROR;
    13211322}
    13221323static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags)
    13231324{
    1324         ICOM_THIS(IShellLinkImpl, iface);
    1325        
    1326         FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
    1327         return NOERROR;
     1325    ICOM_THIS(IShellLinkImpl, iface);
     1326
     1327    FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
     1328    return NOERROR;
    13281329}
    13291330static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile)
    13301331{
    1331         ICOM_THIS(IShellLinkImpl, iface);
    1332        
    1333         TRACE("(%p)->(path=%s)\n",This, pszFile);
    1334 
    1335         if (This->sPath)
    1336             HeapFree(GetProcessHeap(), 0, This->sPath);
    1337         if (!(This->sPath = HEAP_strdupA(GetProcessHeap(), 0, pszFile)))
    1338             return E_OUTOFMEMORY;
    1339        
    1340         return NOERROR;
     1332    ICOM_THIS(IShellLinkImpl, iface);
     1333
     1334    TRACE("(%p)->(path=%s)\n",This, pszFile);
     1335
     1336    if (This->sPath)
     1337        HeapFree(GetProcessHeap(), 0, This->sPath);
     1338    if (!(This->sPath = HEAP_strdupA(GetProcessHeap(), 0, pszFile)))
     1339        return E_OUTOFMEMORY;
     1340
     1341    return NOERROR;
    13411342}
    13421343
     
    13451346*/
    13461347
    1347 static ICOM_VTABLE(IShellLinkA) slvt = 
    1348 {       
    1349         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    1350         IShellLinkA_fnQueryInterface,
    1351         IShellLinkA_fnAddRef,
    1352         IShellLinkA_fnRelease,
    1353         IShellLinkA_fnGetPath,
    1354         IShellLinkA_fnGetIDList,
    1355         IShellLinkA_fnSetIDList,
    1356         IShellLinkA_fnGetDescription,
    1357         IShellLinkA_fnSetDescription,
    1358         IShellLinkA_fnGetWorkingDirectory,
    1359         IShellLinkA_fnSetWorkingDirectory,
    1360         IShellLinkA_fnGetArguments,
    1361         IShellLinkA_fnSetArguments,
    1362         IShellLinkA_fnGetHotkey,
    1363         IShellLinkA_fnSetHotkey,
    1364         IShellLinkA_fnGetShowCmd,
    1365         IShellLinkA_fnSetShowCmd,
    1366         IShellLinkA_fnGetIconLocation,
    1367         IShellLinkA_fnSetIconLocation,
    1368         IShellLinkA_fnSetRelativePath,
    1369         IShellLinkA_fnResolve,
    1370         IShellLinkA_fnSetPath
     1348static ICOM_VTABLE(IShellLinkA) slvt =
     1349{
     1350    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     1351    IShellLinkA_fnQueryInterface,
     1352    IShellLinkA_fnAddRef,
     1353    IShellLinkA_fnRelease,
     1354    IShellLinkA_fnGetPath,
     1355    IShellLinkA_fnGetIDList,
     1356    IShellLinkA_fnSetIDList,
     1357    IShellLinkA_fnGetDescription,
     1358    IShellLinkA_fnSetDescription,
     1359    IShellLinkA_fnGetWorkingDirectory,
     1360    IShellLinkA_fnSetWorkingDirectory,
     1361    IShellLinkA_fnGetArguments,
     1362    IShellLinkA_fnSetArguments,
     1363    IShellLinkA_fnGetHotkey,
     1364    IShellLinkA_fnSetHotkey,
     1365    IShellLinkA_fnGetShowCmd,
     1366    IShellLinkA_fnSetShowCmd,
     1367    IShellLinkA_fnGetIconLocation,
     1368    IShellLinkA_fnSetIconLocation,
     1369    IShellLinkA_fnSetRelativePath,
     1370    IShellLinkA_fnResolve,
     1371    IShellLinkA_fnSetPath
    13711372};
    13721373
     
    13781379  IShellLinkW * iface, REFIID riid, LPVOID *ppvObj)
    13791380{
    1380         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1381        
    1382         return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
     1381    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1382
     1383    return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
    13831384}
    13841385
     
    13881389static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface)
    13891390{
    1390         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1391        
    1392         TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1393 
    1394         return IShellLinkA_AddRef((IShellLinkA*)This);
     1391    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1392
     1393    TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1394
     1395    return IShellLinkA_AddRef((IShellLinkA*)This);
    13951396}
    13961397/******************************************************************************
     
    14001401static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface)
    14011402{
    1402         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1403        
    1404         TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1405 
    1406         return IShellLinkA_Release((IShellLinkA*)This);
     1403    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1404
     1405    TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1406
     1407    return IShellLinkA_Release((IShellLinkA*)This);
    14071408}
    14081409
    14091410static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
    14101411{
    1411         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1412        
    1413         FIXME("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",This, pszFile, cchMaxPath, pfd, fFlags);
     1412    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1413
     1414    FIXME("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n",This, pszFile, cchMaxPath, pfd, fFlags);
    14141415        MultiByteToWideChar( CP_ACP, 0, "c:\\foo.bar", -1, pszFile, cchMaxPath );
    1415         return NOERROR;
     1416    return NOERROR;
    14161417}
    14171418
    14181419static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl)
    14191420{
    1420         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1421        
    1422         FIXME("(%p)->(ppidl=%p)\n",This, ppidl);
    1423         *ppidl = _ILCreateDesktop();
    1424         return NOERROR;
     1421    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1422
     1423    FIXME("(%p)->(ppidl=%p)\n",This, ppidl);
     1424    *ppidl = _ILCreateDesktop();
     1425    return NOERROR;
    14251426}
    14261427
    14271428static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl)
    14281429{
    1429         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1430        
    1431         FIXME("(%p)->(pidl=%p)\n",This, pidl);
    1432         return NOERROR;
     1430    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1431
     1432    FIXME("(%p)->(pidl=%p)\n",This, pidl);
     1433    return NOERROR;
    14331434}
    14341435
    14351436static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName)
    14361437{
    1437         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1438        
    1439         FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
     1438    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1439
     1440    FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
    14401441        MultiByteToWideChar( CP_ACP, 0, "Description, FIXME", -1, pszName, cchMaxName );
    1441         return NOERROR;
     1442    return NOERROR;
    14421443}
    14431444
    14441445static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName)
    14451446{
    1446         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1447        
    1448         TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName));
    1449 
    1450         if (This->sDescription)
    1451             HeapFree(GetProcessHeap(), 0, This->sDescription);
    1452         if (!(This->sDescription = HEAP_strdupWtoA(GetProcessHeap(), 0, pszName)))
    1453             return E_OUTOFMEMORY;
    1454                
    1455         return NOERROR;
     1447    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1448
     1449    TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName));
     1450
     1451    if (This->sDescription)
     1452        HeapFree(GetProcessHeap(), 0, This->sDescription);
     1453    if (!(This->sDescription = HEAP_strdupWtoA(GetProcessHeap(), 0, pszName)))
     1454        return E_OUTOFMEMORY;
     1455
     1456    return NOERROR;
    14561457}
    14571458
    14581459static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath)
    14591460{
    1460         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1461        
    1462         TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath);
    1463 
    1464         MultiByteToWideChar( CP_ACP, 0, This->sWorkDir ? This->sWorkDir : "", -1, pszDir, cchMaxPath );
    1465 
    1466         return NOERROR;
     1461    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1462
     1463    TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath);
     1464
     1465    MultiByteToWideChar( CP_ACP, 0, This->sWorkDir ? This->sWorkDir : "", -1, pszDir, cchMaxPath );
     1466
     1467    return NOERROR;
    14671468}
    14681469
    14691470static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir)
    14701471{
    1471         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1472        
    1473         TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir));
    1474 
    1475         if (This->sWorkDir)
    1476             HeapFree(GetProcessHeap(), 0, This->sWorkDir);
    1477         if (!(This->sWorkDir = HEAP_strdupWtoA(GetProcessHeap(), 0, pszDir)))
    1478             return E_OUTOFMEMORY;
    1479 
    1480         return NOERROR;
     1472    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1473
     1474    TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir));
     1475
     1476    if (This->sWorkDir)
     1477        HeapFree(GetProcessHeap(), 0, This->sWorkDir);
     1478    if (!(This->sWorkDir = HEAP_strdupWtoA(GetProcessHeap(), 0, pszDir)))
     1479        return E_OUTOFMEMORY;
     1480
     1481    return NOERROR;
    14811482}
    14821483
    14831484static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath)
    14841485{
    1485         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1486        
    1487         TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath);
    1488 
    1489         MultiByteToWideChar( CP_ACP, 0, This->sArgs ? This->sArgs : "", -1, pszArgs, cchMaxPath );
    1490 
    1491         return NOERROR;
     1486    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1487
     1488    TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath);
     1489
     1490    MultiByteToWideChar( CP_ACP, 0, This->sArgs ? This->sArgs : "", -1, pszArgs, cchMaxPath );
     1491
     1492    return NOERROR;
    14921493}
    14931494
    14941495static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs)
    14951496{
    1496         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1497        
    1498         TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs));
    1499        
    1500         if (This->sArgs)
    1501             HeapFree(GetProcessHeap(), 0, This->sArgs);
    1502         if (!(This->sArgs = HEAP_strdupWtoA(GetProcessHeap(), 0, pszArgs)))
    1503             return E_OUTOFMEMORY;
    1504        
    1505         return NOERROR;
     1497    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1498
     1499    TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs));
     1500
     1501    if (This->sArgs)
     1502        HeapFree(GetProcessHeap(), 0, This->sArgs);
     1503    if (!(This->sArgs = HEAP_strdupWtoA(GetProcessHeap(), 0, pszArgs)))
     1504        return E_OUTOFMEMORY;
     1505
     1506    return NOERROR;
    15061507}
    15071508
    15081509static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey)
    15091510{
    1510         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1511        
    1512         FIXME("(%p)->(%p)\n",This, pwHotkey);
    1513         *pwHotkey=0x0;
    1514         return NOERROR;
     1511    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1512
     1513    FIXME("(%p)->(%p)\n",This, pwHotkey);
     1514    *pwHotkey=0x0;
     1515    return NOERROR;
    15151516}
    15161517
    15171518static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey)
    15181519{
    1519         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1520        
    1521         FIXME("(%p)->(hotkey=%x)\n",This, wHotkey);
    1522         return NOERROR;
     1520    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1521
     1522    FIXME("(%p)->(hotkey=%x)\n",This, wHotkey);
     1523    return NOERROR;
    15231524}
    15241525
    15251526static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd)
    15261527{
    1527         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1528        
    1529         FIXME("(%p)->(%p)\n",This, piShowCmd);
    1530         *piShowCmd=0;
    1531         return NOERROR;
     1528    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1529
     1530    FIXME("(%p)->(%p)\n",This, piShowCmd);
     1531    *piShowCmd=0;
     1532    return NOERROR;
    15321533}
    15331534
    15341535static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd)
    15351536{
    1536         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1537        
    1538         FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
    1539         return NOERROR;
     1537    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1538
     1539    FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
     1540    return NOERROR;
    15401541}
    15411542
    15421543static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon)
    15431544{
    1544         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1545        
    1546         TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
     1545    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1546
     1547    TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
    15471548
    15481549        MultiByteToWideChar( CP_ACP, 0, This->sIcoPath ? This->sIcoPath : "", -1, pszIconPath, cchIconPath );
    1549         *piIcon = This->iIcoNdx;
    1550 
    1551         return NOERROR;
     1550    *piIcon = This->iIcoNdx;
     1551
     1552    return NOERROR;
    15521553}
    15531554
    15541555static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon)
    15551556{
    1556         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1557        
    1558         TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon);
    1559 
    1560         if (This->sIcoPath)
    1561             HeapFree(GetProcessHeap(), 0, This->sIcoPath);
    1562         if (!(This->sIcoPath = HEAP_strdupWtoA(GetProcessHeap(), 0, pszIconPath)))
    1563             return E_OUTOFMEMORY;       
    1564         This->iIcoNdx = iIcon;
    1565 
    1566         return NOERROR;
     1557    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1558
     1559    TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon);
     1560
     1561    if (This->sIcoPath)
     1562        HeapFree(GetProcessHeap(), 0, This->sIcoPath);
     1563    if (!(This->sIcoPath = HEAP_strdupWtoA(GetProcessHeap(), 0, pszIconPath)))
     1564        return E_OUTOFMEMORY;
     1565    This->iIcoNdx = iIcon;
     1566
     1567    return NOERROR;
    15671568}
    15681569
    15691570static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved)
    15701571{
    1571         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1572        
    1573         FIXME("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
    1574         return NOERROR;
     1572    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1573
     1574    FIXME("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
     1575    return NOERROR;
    15751576}
    15761577
    15771578static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags)
    15781579{
    1579         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1580        
    1581         FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
    1582         return NOERROR;
     1580    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1581
     1582    FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
     1583    return NOERROR;
    15831584}
    15841585
    15851586static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile)
    15861587{
    1587         _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1588        
    1589         TRACE("(%p)->(path=%s)\n",This, debugstr_w(pszFile));
    1590        
    1591         if (This->sPath)
    1592             HeapFree(GetProcessHeap(), 0, This->sPath);
    1593         if (!(This->sPath = HEAP_strdupWtoA(GetProcessHeap(), 0, pszFile)))
    1594             return E_OUTOFMEMORY;       
    1595        
    1596         return NOERROR;
     1588    _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1589
     1590    TRACE("(%p)->(path=%s)\n",This, debugstr_w(pszFile));
     1591
     1592    if (This->sPath)
     1593        HeapFree(GetProcessHeap(), 0, This->sPath);
     1594    if (!(This->sPath = HEAP_strdupWtoA(GetProcessHeap(), 0, pszFile)))
     1595        return E_OUTOFMEMORY;
     1596
     1597    return NOERROR;
    15971598}
    15981599
     
    16011602*/
    16021603
    1603 static ICOM_VTABLE(IShellLinkW) slvtw = 
    1604 {       
    1605         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    1606         IShellLinkW_fnQueryInterface,
    1607         IShellLinkW_fnAddRef,
    1608         IShellLinkW_fnRelease,
    1609         IShellLinkW_fnGetPath,
    1610         IShellLinkW_fnGetIDList,
    1611         IShellLinkW_fnSetIDList,
    1612         IShellLinkW_fnGetDescription,
    1613         IShellLinkW_fnSetDescription,
    1614         IShellLinkW_fnGetWorkingDirectory,
    1615         IShellLinkW_fnSetWorkingDirectory,
    1616         IShellLinkW_fnGetArguments,
    1617         IShellLinkW_fnSetArguments,
    1618         IShellLinkW_fnGetHotkey,
    1619         IShellLinkW_fnSetHotkey,
    1620         IShellLinkW_fnGetShowCmd,
    1621         IShellLinkW_fnSetShowCmd,
    1622         IShellLinkW_fnGetIconLocation,
    1623         IShellLinkW_fnSetIconLocation,
    1624         IShellLinkW_fnSetRelativePath,
    1625         IShellLinkW_fnResolve,
    1626         IShellLinkW_fnSetPath
     1604static ICOM_VTABLE(IShellLinkW) slvtw =
     1605{
     1606    ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     1607    IShellLinkW_fnQueryInterface,
     1608    IShellLinkW_fnAddRef,
     1609    IShellLinkW_fnRelease,
     1610    IShellLinkW_fnGetPath,
     1611    IShellLinkW_fnGetIDList,
     1612    IShellLinkW_fnSetIDList,
     1613    IShellLinkW_fnGetDescription,
     1614    IShellLinkW_fnSetDescription,
     1615    IShellLinkW_fnGetWorkingDirectory,
     1616    IShellLinkW_fnSetWorkingDirectory,
     1617    IShellLinkW_fnGetArguments,
     1618    IShellLinkW_fnSetArguments,
     1619    IShellLinkW_fnGetHotkey,
     1620    IShellLinkW_fnSetHotkey,
     1621    IShellLinkW_fnGetShowCmd,
     1622    IShellLinkW_fnSetShowCmd,
     1623    IShellLinkW_fnGetIconLocation,
     1624    IShellLinkW_fnSetIconLocation,
     1625    IShellLinkW_fnSetRelativePath,
     1626    IShellLinkW_fnResolve,
     1627    IShellLinkW_fnSetPath
    16271628};
    16281629
Note: See TracChangeset for help on using the changeset viewer.