Ignore:
Timestamp:
Sep 15, 2001, 11:26:26 AM (24 years ago)
Author:
sandervl
Message:

restored old version

File:
1 edited

Legend:

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

    r6650 r6709  
    1 /* $Id: shelllink.c,v 1.8 2001-09-05 13:46:57 bird Exp $ */
    21/*
    32 *
    4  *  Copyright 1997  Marcus Meissner
    5  *  Copyright 1998  Juergen Schmied
     3 *      Copyright 1997  Marcus Meissner
     4 *      Copyright 1998  Juergen Schmied
    65 *
    76 */
     
    5857
    5958/* flag1: lnk elements: simple link has 0x0B */
    60 #define WORKDIR     0x10
    61 #define ARGUMENT    0x20
    62 #define ICON        0x40
    63 #define UNC     0x80
     59#define WORKDIR         0x10
     60#define ARGUMENT        0x20
     61#define ICON            0x40
     62#define UNC             0x80
    6463
    6564/* fStartup */
    66 #define NORMAL      0x01
    67 #define MAXIMIZED   0x03
    68 #define MINIMIZED   0x07
    69 
    70 typedef 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 */
     65#define NORMAL          0x01
     66#define MAXIMIZED       0x03
     67#define MINIMIZED       0x07
     68
     69typedef 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 */
    8685} LINK_HEADER, * PLINK_HEADER;
    8786
     
    9089typedef struct
    9190{
    92     BYTE bWidth;
    93     BYTE bHeight;
    94     BYTE bColorCount;
    95     BYTE bReserved;
    96     WORD wPlanes;
    97     WORD wBitCount;
    98     DWORD dwBytesInRes;
    99     WORD nID;
     91        BYTE bWidth;
     92        BYTE bHeight;
     93        BYTE bColorCount;
     94        BYTE bReserved;
     95        WORD wPlanes;
     96        WORD wBitCount;
     97        DWORD dwBytesInRes;
     98        WORD nID;
    10099} GRPICONDIRENTRY;
    101100
    102101typedef struct
    103102{
    104     WORD idReserved;
    105     WORD idType;
    106     WORD idCount;
    107     GRPICONDIRENTRY idEntries[1];
     103        WORD idReserved;
     104        WORD idType;
     105        WORD idCount;
     106        GRPICONDIRENTRY idEntries[1];
    108107} GRPICONDIR;
    109108
    110109typedef struct
    111110{
    112     BYTE bWidth;
    113     BYTE bHeight;
    114     BYTE bColorCount;
    115     BYTE bReserved;
    116     WORD wPlanes;
    117     WORD wBitCount;
    118     DWORD dwBytesInRes;
    119     DWORD dwImageOffset;
     111        BYTE bWidth;
     112        BYTE bHeight;
     113        BYTE bColorCount;
     114        BYTE bReserved;
     115        WORD wPlanes;
     116        WORD wBitCount;
     117        DWORD dwBytesInRes;
     118        DWORD dwImageOffset;
    120119} ICONDIRENTRY;
    121120
    122121typedef struct
    123122{
    124     WORD idReserved;
    125     WORD idType;
    126     WORD idCount;
     123        WORD idReserved;
     124        WORD idType;
     125        WORD idCount;
    127126} ICONDIR;
    128127
     
    131130
    132131
    133 static ICOM_VTABLE(IShellLinkA)     slvt;
    134 static ICOM_VTABLE(IShellLinkW)     slvtw;
    135 static ICOM_VTABLE(IPersistFile)    pfvt;
    136 static ICOM_VTABLE(IPersistStream)  psvt;
     132static ICOM_VTABLE(IShellLinkA)         slvt;
     133static ICOM_VTABLE(IShellLinkW)         slvtw;
     134static ICOM_VTABLE(IPersistFile)        pfvt;
     135static ICOM_VTABLE(IPersistStream)      psvt;
    137136
    138137/* IShellLink Implementation */
     
    140139typedef struct
    141140{
    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;
     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;
    165164} IShellLinkImpl;
    166165
     
    179178 */
    180179static HRESULT WINAPI IPersistFile_fnQueryInterface(
    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);
     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);
    190189}
    191190
     
    195194static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface)
    196195{
    197     _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    198 
    199     TRACE("(%p)->(count=%lu)\n",This,This->ref);
    200 
    201     return IShellLinkA_AddRef((IShellLinkA*)This);
     196        _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     197
     198        TRACE("(%p)->(count=%lu)\n",This,This->ref);
     199
     200        return IShellLinkA_AddRef((IShellLinkA*)This);
    202201}
    203202/******************************************************************************
     
    206205static ULONG WINAPI IPersistFile_fnRelease(IPersistFile* iface)
    207206{
    208     _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    209 
    210     TRACE("(%p)->(count=%lu)\n",This,This->ref);
    211 
    212     return IShellLinkA_Release((IShellLinkA*)This);
     207        _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     208
     209        TRACE("(%p)->(count=%lu)\n",This,This->ref);
     210
     211        return IShellLinkA_Release((IShellLinkA*)This);
    213212}
    214213
    215214static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile* iface, CLSID *pClassID)
    216215{
    217     _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    218     FIXME("(%p)\n",This);
    219     return NOERROR;
     216        _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     217        FIXME("(%p)\n",This);
     218        return NOERROR;
    220219}
    221220static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile* iface)
    222221{
    223     _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
    224     FIXME("(%p)\n",This);
    225     return NOERROR;
     222        _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface)
     223        FIXME("(%p)\n",This);
     224        return NOERROR;
    226225}
    227226static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
    228227{
    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;
     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;
    250249}
    251250
    252251
    253252#ifdef __WIN32OS2__
    254 static BOOL SaveIconResAsOS2ICO(GRPICONDIR *pIconDir, HINSTANCE hInstance,
     253static BOOL SaveIconResAsOS2ICO(GRPICONDIR *pIconDir, HINSTANCE hInstance, 
    255254                                const char *szXPMFileName)
    256255{
     
    395394#ifdef __WIN32OS2__
    396395        if(!hResInfo) {
    397             hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_ICONA);
     396            hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_ICONA);       
    398397            if(hResInfo) {
    399398                GRPICONDIR icondir = {0};
    400399                BITMAPINFO *bmi;
    401400
    402                 bmi = (BITMAPINFO *)LockResource(LoadResource(hModule, hResInfo));
     401                bmi = (BITMAPINFO *)LockResource(LoadResource(hModule, hResInfo));
    403402
    404403                icondir.idReserved = 0;
     
    685684    tmp[3] = 'O';
    686685    /* extract the icon */
    687     if (!extract_icon( This->sIcoPath && strlen(This->sIcoPath) ?
     686    if (!extract_icon( This->sIcoPath && strlen(This->sIcoPath) ? 
    688687                       This->sIcoPath : This->sPath,
    689688                       icon_name, This->iIcoNdx)) goto done;
     
    691690    if(OSLibWinCreateObject(This->sPath, This->sArgs, This->sWorkDir, filename,
    692691                            This->sDescription, icon_name,
    693                             This->iIcoNdx, bDesktop) == FALSE)
     692                            This->iIcoNdx, bDesktop) == FALSE) 
    694693    {
    695694        ret = E_ACCESSDENIED;
    696695    }
    697 
     696   
    698697 done:
    699698    if(shell_link_app) HeapFree( GetProcessHeap(), 0, shell_link_app );
     
    761760
    762761    /* extract the icon */
    763     if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ?
     762    if (!(icon_name = extract_icon( This->sIcoPath && strlen(This->sIcoPath) ? 
    764763                                      This->sIcoPath : This->sPath,
    765764                                      This->iIcoNdx ))) goto done;
     
    830829static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName)
    831830{
    832     _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
    833     FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName));
    834     return NOERROR;
     831        _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
     832        FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName));
     833        return NOERROR;
    835834}
    836835static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName)
    837836{
    838     _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
    839     FIXME("(%p)\n",This);
    840     return NOERROR;
    841 }
    842 
    843 static 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
     837        _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface);
     838        FIXME("(%p)\n",This);
     839        return NOERROR;
     840}
     841
     842static 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
    855854};
    856855
     
    859858 */
    860859static HRESULT WINAPI IPersistStream_fnQueryInterface(
    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);
     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);
    870869}
    871870
     
    874873 */
    875874static ULONG WINAPI IPersistStream_fnRelease(
    876     IPersistStream* iface)
    877 {
    878     _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    879 
    880     TRACE("(%p)\n",This);
    881 
    882     return IShellLinkA_Release((IShellLinkA*)This);
     875        IPersistStream* iface)
     876{
     877        _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     878
     879        TRACE("(%p)\n",This);
     880
     881        return IShellLinkA_Release((IShellLinkA*)This);
    883882}
    884883
     
    887886 */
    888887static ULONG WINAPI IPersistStream_fnAddRef(
    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 }
     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} 
    897896
    898897/************************************************************************
     
    901900 */
    902901static HRESULT WINAPI IPersistStream_fnGetClassID(
    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;
     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;
    916915}
    917916
     
    920919 */
    921920static HRESULT WINAPI IPersistStream_fnIsDirty(
    922     IPersistStream*  iface)
    923 {
    924     _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
    925 
    926     TRACE("(%p)\n", This);
    927 
    928     return S_OK;
     921        IPersistStream*  iface)
     922{
     923        _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface);
     924
     925        TRACE("(%p)\n", This);
     926
     927        return S_OK;
    929928}
    930929/************************************************************************
     
    933932
    934933static HRESULT WINAPI IPersistStream_fnLoad(
    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);
     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);
    975974#if 1
    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;
     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;
    10021001}
    10031002
     
    10061005 */
    10071006static HRESULT WINAPI IPersistStream_fnSave(
    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;
     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;
    10171016}
    10181017
     
    10211020 */
    10221021static HRESULT WINAPI IPersistStream_fnGetSizeMax(
    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;
     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;
    10311030}
    10321031
    10331032static ICOM_VTABLE(IPersistStream) psvt =
    10341033{
    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
     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
    10441043};
    10451044
    10461045/**************************************************************************
    1047  *    IShellLink_Constructor
    1048  */
    1049 IShellLinkA * 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;
     1046 *        IShellLink_Constructor
     1047 */
     1048IShellLinkA * 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;
    10621061}
    10631062
     
    10671066static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid,  LPVOID *ppvObj)
    10681067{
    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 }
     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} 
    11021101/******************************************************************************
    11031102 * IShellLinkA_AddRef
     
    11051104static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface)
    11061105{
    1107     ICOM_THIS(IShellLinkImpl, iface);
    1108 
    1109     TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1110 
    1111     shell32_ObjCount++;
    1112     return ++(This->ref);
     1106        ICOM_THIS(IShellLinkImpl, iface);
     1107       
     1108        TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1109
     1110        shell32_ObjCount++;
     1111        return ++(This->ref);
    11131112}
    11141113/******************************************************************************
    1115  *  IShellLinkA_Release
     1114 *      IShellLinkA_Release
    11161115 */
    11171116static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface)
    11181117{
    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;
     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;
    11541153}
    11551154
    11561155static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
    11571156{
    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;
     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;
    11681167}
    11691168static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl)
    11701169{
    1171     ICOM_THIS(IShellLinkImpl, iface);
    1172 
    1173     TRACE("(%p)->(ppidl=%p)\n",This, ppidl);
    1174 
    1175     *ppidl = ILClone(This->pPidl);
    1176     return NOERROR;
     1170        ICOM_THIS(IShellLinkImpl, iface);
     1171       
     1172        TRACE("(%p)->(ppidl=%p)\n",This, ppidl);
     1173
     1174        *ppidl = ILClone(This->pPidl);
     1175        return NOERROR;
    11771176}
    11781177static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl)
    11791178{
    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;
     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;
    11881187}
    11891188static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName)
    11901189{
    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;
     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;
    11961195}
    11971196static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName)
    11981197{
    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;
     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;
    12091208}
    12101209static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath)
    12111210{
    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;
     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;
    12191218}
    12201219static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir)
    12211220{
    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;
     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;
    12321231}
    12331232static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath)
    12341233{
    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;
     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;
    12421241}
    12431242static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs)
    12441243{
    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;
     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;
    12551254}
    12561255static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey)
    12571256{
    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;
     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;
    12651264}
    12661265static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey)
    12671266{
    1268     ICOM_THIS(IShellLinkImpl, iface);
    1269 
    1270     TRACE("(%p)->(hotkey=%x)\n",This, wHotkey);
    1271 
    1272     This->wHotKey = wHotkey;
    1273 
    1274     return NOERROR;
     1267        ICOM_THIS(IShellLinkImpl, iface);
     1268       
     1269        TRACE("(%p)->(hotkey=%x)\n",This, wHotkey);
     1270       
     1271        This->wHotKey = wHotkey;
     1272
     1273        return NOERROR;
    12751274}
    12761275static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd)
    12771276{
    1278     ICOM_THIS(IShellLinkImpl, iface);
    1279 
    1280     FIXME("(%p)->(%p)\n",This, piShowCmd);
    1281     *piShowCmd=0;
    1282     return NOERROR;
     1277        ICOM_THIS(IShellLinkImpl, iface);
     1278       
     1279        FIXME("(%p)->(%p)\n",This, piShowCmd);
     1280        *piShowCmd=0;
     1281        return NOERROR;
    12831282}
    12841283static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd)
    12851284{
    1286     ICOM_THIS(IShellLinkImpl, iface);
    1287 
    1288     FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
    1289     return NOERROR;
     1285        ICOM_THIS(IShellLinkImpl, iface);
     1286       
     1287        FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
     1288        return NOERROR;
    12901289}
    12911290static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
    12921291{
    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;
     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;
    13011300}
    13021301static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon)
    13031302{
    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;
     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;
    13151314}
    13161315static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved)
    13171316{
    1318     ICOM_THIS(IShellLinkImpl, iface);
    1319 
    1320     FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
    1321     return NOERROR;
     1317        ICOM_THIS(IShellLinkImpl, iface);
     1318       
     1319        FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
     1320        return NOERROR;
    13221321}
    13231322static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags)
    13241323{
    1325     ICOM_THIS(IShellLinkImpl, iface);
    1326 
    1327     FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
    1328     return NOERROR;
     1324        ICOM_THIS(IShellLinkImpl, iface);
     1325       
     1326        FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
     1327        return NOERROR;
    13291328}
    13301329static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile)
    13311330{
    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;
     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;
    13421341}
    13431342
     
    13461345*/
    13471346
    1348 static 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
     1347static 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
    13721371};
    13731372
     
    13791378  IShellLinkW * iface, REFIID riid, LPVOID *ppvObj)
    13801379{
    1381     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1382 
    1383     return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
     1380        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1381       
     1382        return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
    13841383}
    13851384
     
    13891388static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface)
    13901389{
    1391     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1392 
    1393     TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1394 
    1395     return IShellLinkA_AddRef((IShellLinkA*)This);
     1390        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1391       
     1392        TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1393
     1394        return IShellLinkA_AddRef((IShellLinkA*)This);
    13961395}
    13971396/******************************************************************************
     
    14011400static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface)
    14021401{
    1403     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1404 
    1405     TRACE("(%p)->(count=%lu)\n",This,This->ref);
    1406 
    1407     return IShellLinkA_Release((IShellLinkA*)This);
     1402        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1403       
     1404        TRACE("(%p)->(count=%lu)\n",This,This->ref);
     1405
     1406        return IShellLinkA_Release((IShellLinkA*)This);
    14081407}
    14091408
    14101409static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
    14111410{
    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);
     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);
    14151414        MultiByteToWideChar( CP_ACP, 0, "c:\\foo.bar", -1, pszFile, cchMaxPath );
    1416     return NOERROR;
     1415        return NOERROR;
    14171416}
    14181417
    14191418static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl)
    14201419{
    1421     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1422 
    1423     FIXME("(%p)->(ppidl=%p)\n",This, ppidl);
    1424     *ppidl = _ILCreateDesktop();
    1425     return NOERROR;
     1420        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1421       
     1422        FIXME("(%p)->(ppidl=%p)\n",This, ppidl);
     1423        *ppidl = _ILCreateDesktop();
     1424        return NOERROR;
    14261425}
    14271426
    14281427static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl)
    14291428{
    1430     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1431 
    1432     FIXME("(%p)->(pidl=%p)\n",This, pidl);
    1433     return NOERROR;
     1429        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1430       
     1431        FIXME("(%p)->(pidl=%p)\n",This, pidl);
     1432        return NOERROR;
    14341433}
    14351434
    14361435static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName)
    14371436{
    1438     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1439 
    1440     FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
     1437        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1438       
     1439        FIXME("(%p)->(%p len=%u)\n",This, pszName, cchMaxName);
    14411440        MultiByteToWideChar( CP_ACP, 0, "Description, FIXME", -1, pszName, cchMaxName );
    1442     return NOERROR;
     1441        return NOERROR;
    14431442}
    14441443
    14451444static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName)
    14461445{
    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;
     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;
    14571456}
    14581457
    14591458static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath)
    14601459{
    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;
     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;
    14681467}
    14691468
    14701469static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir)
    14711470{
    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;
     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;
    14821481}
    14831482
    14841483static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath)
    14851484{
    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;
     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;
    14931492}
    14941493
    14951494static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs)
    14961495{
    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;
     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;
    15071506}
    15081507
    15091508static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey)
    15101509{
    1511     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1512 
    1513     FIXME("(%p)->(%p)\n",This, pwHotkey);
    1514     *pwHotkey=0x0;
    1515     return NOERROR;
     1510        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1511       
     1512        FIXME("(%p)->(%p)\n",This, pwHotkey);
     1513        *pwHotkey=0x0;
     1514        return NOERROR;
    15161515}
    15171516
    15181517static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey)
    15191518{
    1520     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1521 
    1522     FIXME("(%p)->(hotkey=%x)\n",This, wHotkey);
    1523     return NOERROR;
     1519        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1520       
     1521        FIXME("(%p)->(hotkey=%x)\n",This, wHotkey);
     1522        return NOERROR;
    15241523}
    15251524
    15261525static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd)
    15271526{
    1528     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1529 
    1530     FIXME("(%p)->(%p)\n",This, piShowCmd);
    1531     *piShowCmd=0;
    1532     return NOERROR;
     1527        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1528       
     1529        FIXME("(%p)->(%p)\n",This, piShowCmd);
     1530        *piShowCmd=0;
     1531        return NOERROR;
    15331532}
    15341533
    15351534static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd)
    15361535{
    1537     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1538 
    1539     FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
    1540     return NOERROR;
     1536        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1537       
     1538        FIXME("(%p)->(showcmd=%x)\n",This, iShowCmd);
     1539        return NOERROR;
    15411540}
    15421541
    15431542static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon)
    15441543{
    1545     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1546 
    1547     TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
     1544        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1545       
     1546        TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon);
    15481547
    15491548        MultiByteToWideChar( CP_ACP, 0, This->sIcoPath ? This->sIcoPath : "", -1, pszIconPath, cchIconPath );
    1550     *piIcon = This->iIcoNdx;
    1551 
    1552     return NOERROR;
     1549        *piIcon = This->iIcoNdx;
     1550
     1551        return NOERROR;
    15531552}
    15541553
    15551554static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon)
    15561555{
    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;
     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;
    15681567}
    15691568
    15701569static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved)
    15711570{
    1572     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1573 
    1574     FIXME("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
    1575     return NOERROR;
     1571        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1572       
     1573        FIXME("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
     1574        return NOERROR;
    15761575}
    15771576
    15781577static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags)
    15791578{
    1580     _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    1581 
    1582     FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
    1583     return NOERROR;
     1579        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
     1580       
     1581        FIXME("(%p)->(hwnd=%x flags=%lx)\n",This, hwnd, fFlags);
     1582        return NOERROR;
    15841583}
    15851584
    15861585static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile)
    15871586{
    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;
     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;
    15981597}
    15991598
     
    16021601*/
    16031602
    1604 static 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
     1603static 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
    16281627};
    16291628
Note: See TracChangeset for help on using the changeset viewer.