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

Synchronized shell32 with wine

File:
1 edited

Legend:

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

    r3243 r4032  
    1 /* $Id: shelllink.cpp,v 1.3 2000-03-26 16:34:50 cbratschi Exp $ */
     1/* $Id: shelllink.cpp,v 1.4 2000-08-18 02:01:21 phaller Exp $ */
    22/*
    33 *
     
    7979typedef struct
    8080{
    81         ICOM_VTABLE(IShellLink)*        lpvtbl;
     81        ICOM_VTABLE(IShellLinkA)*       lpvtbl;
    8282        DWORD                           ref;
    8383
     
    121121        TRACE("(%p)\n",This);
    122122
    123         return IShellLink_QueryInterface((IShellLink*)This, riid, ppvObj);
     123        return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
    124124}
    125125
     
    133133        TRACE("(%p)->(count=%lu)\n",This,This->ref);
    134134
    135         return IShellLink_AddRef((IShellLink*)This);
     135        return IShellLinkA_AddRef((IShellLinkA*)This);
    136136}
    137137/******************************************************************************
     
    144144        TRACE("(%p)->(count=%lu)\n",This,This->ref);
    145145
    146         return IShellLink_Release((IShellLink*)This);
     146        return IShellLinkA_Release((IShellLinkA*)This);
    147147}
    148148
     
    229229        TRACE("(%p)\n",This);
    230230
    231         return IShellLink_QueryInterface((IShellLink*)This, riid, ppvoid);
     231        return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvoid);
    232232}
    233233
     
    242242        TRACE("(%p)\n",This);
    243243
    244         return IShellLink_Release((IShellLink*)This);
     244        return IShellLinkA_Release((IShellLinkA*)This);
    245245}
    246246
     
    255255        TRACE("(%p)\n",This);
    256256
    257         return IShellLink_AddRef((IShellLink*)This);
     257        return IShellLinkA_AddRef((IShellLinkA*)This);
    258258}
    259259
     
    409409 *  IShellLink_QueryInterface
    410410 */
    411 static HRESULT WINAPI IShellLink_fnQueryInterface( IShellLink * iface, REFIID riid,  LPVOID *ppvObj)
     411static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid,  LPVOID *ppvObj)
    412412{
    413413        ICOM_THIS(IShellLinkImpl, iface);
     
    420420
    421421        if(IsEqualIID(riid, &IID_IUnknown) ||
    422            IsEqualIID(riid, &IID_IShellLink))
     422           IsEqualIID(riid, &IID_IShellLinkA))
    423423        {
    424424          *ppvObj = This;
     
    447447}
    448448/******************************************************************************
    449  * IShellLink_AddRef
    450  */
    451 static ULONG WINAPI IShellLink_fnAddRef(IShellLink * iface)
     449 * IShellLinkA_AddRef
     450 */
     451static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface)
    452452{
    453453        ICOM_THIS(IShellLinkImpl, iface);
     
    459459}
    460460/******************************************************************************
    461  *      IShellLink_Release
    462  */
    463 static ULONG WINAPI IShellLink_fnRelease(IShellLink * iface)
     461 *      IShellLinkA_Release
     462 */
     463static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface)
    464464{
    465465        ICOM_THIS(IShellLinkImpl, iface);
     
    486486}
    487487
    488 static HRESULT WINAPI IShellLink_fnGetPath(IShellLink * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
     488static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags)
    489489{
    490490        ICOM_THIS(IShellLinkImpl, iface);
     
    499499        return NOERROR;
    500500}
    501 static HRESULT WINAPI IShellLink_fnGetIDList(IShellLink * iface, LPITEMIDLIST * ppidl)
     501static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl)
    502502{
    503503        ICOM_THIS(IShellLinkImpl, iface);
     
    508508        return NOERROR;
    509509}
    510 static HRESULT WINAPI IShellLink_fnSetIDList(IShellLink * iface, LPCITEMIDLIST pidl)
     510static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl)
    511511{
    512512        ICOM_THIS(IShellLinkImpl, iface);
     
    519519        return NOERROR;
    520520}
    521 static HRESULT WINAPI IShellLink_fnGetDescription(IShellLink * iface, LPSTR pszName,INT cchMaxName)
     521static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName)
    522522{
    523523        ICOM_THIS(IShellLinkImpl, iface);
     
    527527        return NOERROR;
    528528}
    529 static HRESULT WINAPI IShellLink_fnSetDescription(IShellLink * iface, LPCSTR pszName)
     529static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName)
    530530{
    531531        ICOM_THIS(IShellLinkImpl, iface);
     
    534534        return NOERROR;
    535535}
    536 static HRESULT WINAPI IShellLink_fnGetWorkingDirectory(IShellLink * iface, LPSTR pszDir,INT cchMaxPath)
     536static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath)
    537537{
    538538        ICOM_THIS(IShellLinkImpl, iface);
     
    542542        return NOERROR;
    543543}
    544 static HRESULT WINAPI IShellLink_fnSetWorkingDirectory(IShellLink * iface, LPCSTR pszDir)
     544static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir)
    545545{
    546546        ICOM_THIS(IShellLinkImpl, iface);
     
    549549        return NOERROR;
    550550}
    551 static HRESULT WINAPI IShellLink_fnGetArguments(IShellLink * iface, LPSTR pszArgs,INT cchMaxPath)
     551static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath)
    552552{
    553553        ICOM_THIS(IShellLinkImpl, iface);
     
    557557        return NOERROR;
    558558}
    559 static HRESULT WINAPI IShellLink_fnSetArguments(IShellLink * iface, LPCSTR pszArgs)
     559static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs)
    560560{
    561561        ICOM_THIS(IShellLinkImpl, iface);
     
    565565        return NOERROR;
    566566}
    567 static HRESULT WINAPI IShellLink_fnGetHotkey(IShellLink * iface, WORD *pwHotkey)
     567static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey)
    568568{
    569569        ICOM_THIS(IShellLinkImpl, iface);
     
    575575        return NOERROR;
    576576}
    577 static HRESULT WINAPI IShellLink_fnSetHotkey(IShellLink * iface, WORD wHotkey)
     577static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey)
    578578{
    579579        ICOM_THIS(IShellLinkImpl, iface);
     
    585585        return NOERROR;
    586586}
    587 static HRESULT WINAPI IShellLink_fnGetShowCmd(IShellLink * iface, INT *piShowCmd)
     587static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd)
    588588{
    589589        ICOM_THIS(IShellLinkImpl, iface);
     
    593593        return NOERROR;
    594594}
    595 static HRESULT WINAPI IShellLink_fnSetShowCmd(IShellLink * iface, INT iShowCmd)
     595static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd)
    596596{
    597597        ICOM_THIS(IShellLinkImpl, iface);
     
    600600        return NOERROR;
    601601}
    602 static HRESULT WINAPI IShellLink_fnGetIconLocation(IShellLink * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
     602static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon)
    603603{
    604604        ICOM_THIS(IShellLinkImpl, iface);
     
    609609        return NOERROR;
    610610}
    611 static HRESULT WINAPI IShellLink_fnSetIconLocation(IShellLink * iface, LPCSTR pszIconPath,INT iIcon)
     611static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon)
    612612{
    613613        ICOM_THIS(IShellLinkImpl, iface);
     
    616616        return NOERROR;
    617617}
    618 static HRESULT WINAPI IShellLink_fnSetRelativePath(IShellLink * iface, LPCSTR pszPathRel, DWORD dwReserved)
     618static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved)
    619619{
    620620        ICOM_THIS(IShellLinkImpl, iface);
     
    623623        return NOERROR;
    624624}
    625 static HRESULT WINAPI IShellLink_fnResolve(IShellLink * iface, HWND hwnd, DWORD fFlags)
     625static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags)
    626626{
    627627        ICOM_THIS(IShellLinkImpl, iface);
     
    630630        return NOERROR;
    631631}
    632 static HRESULT WINAPI IShellLink_fnSetPath(IShellLink * iface, LPCSTR pszFile)
     632static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile)
    633633{
    634634        ICOM_THIS(IShellLinkImpl, iface);
     
    642642*/
    643643
    644 static ICOM_VTABLE(IShellLink) slvt =
     644static ICOM_VTABLE(IShellLinkA) slvt =
    645645{
    646646        ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
    647         IShellLink_fnQueryInterface,
    648         IShellLink_fnAddRef,
    649         IShellLink_fnRelease,
    650         IShellLink_fnGetPath,
    651         IShellLink_fnGetIDList,
    652         IShellLink_fnSetIDList,
    653         IShellLink_fnGetDescription,
    654         IShellLink_fnSetDescription,
    655         IShellLink_fnGetWorkingDirectory,
    656         IShellLink_fnSetWorkingDirectory,
    657         IShellLink_fnGetArguments,
    658         IShellLink_fnSetArguments,
    659         IShellLink_fnGetHotkey,
    660         IShellLink_fnSetHotkey,
    661         IShellLink_fnGetShowCmd,
    662         IShellLink_fnSetShowCmd,
    663         IShellLink_fnGetIconLocation,
    664         IShellLink_fnSetIconLocation,
    665         IShellLink_fnSetRelativePath,
    666         IShellLink_fnResolve,
    667         IShellLink_fnSetPath
     647        IShellLinkA_fnQueryInterface,
     648        IShellLinkA_fnAddRef,
     649        IShellLinkA_fnRelease,
     650        IShellLinkA_fnGetPath,
     651        IShellLinkA_fnGetIDList,
     652        IShellLinkA_fnSetIDList,
     653        IShellLinkA_fnGetDescription,
     654        IShellLinkA_fnSetDescription,
     655        IShellLinkA_fnGetWorkingDirectory,
     656        IShellLinkA_fnSetWorkingDirectory,
     657        IShellLinkA_fnGetArguments,
     658        IShellLinkA_fnSetArguments,
     659        IShellLinkA_fnGetHotkey,
     660        IShellLinkA_fnSetHotkey,
     661        IShellLinkA_fnGetShowCmd,
     662        IShellLinkA_fnSetShowCmd,
     663        IShellLinkA_fnGetIconLocation,
     664        IShellLinkA_fnSetIconLocation,
     665        IShellLinkA_fnSetRelativePath,
     666        IShellLinkA_fnResolve,
     667        IShellLinkA_fnSetPath
    668668};
    669669
     
    677677        _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface);
    678678
    679         return IShellLink_QueryInterface((IShellLink*)This, riid, ppvObj);
     679        return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj);
    680680}
    681681
     
    689689        TRACE("(%p)->(count=%lu)\n",This,This->ref);
    690690
    691         return IShellLink_AddRef((IShellLink*)This);
     691        return IShellLinkA_AddRef((IShellLinkA*)This);
    692692}
    693693/******************************************************************************
     
    701701        TRACE("(%p)->(count=%lu)\n",This,This->ref);
    702702
    703         return IShellLink_Release((IShellLink*)This);
     703        return IShellLinkA_Release((IShellLinkA*)This);
    704704}
    705705
     
    888888
    889889/**************************************************************************
    890  *        IShellLink_Constructor
    891  */
    892 IShellLink * IShellLink_Constructor(BOOL bUnicode)
     890 *        IShellLinkA_Constructor
     891 */
     892IShellLinkA * IShellLink_Constructor(BOOL bUnicode)
    893893{       IShellLinkImpl * sl;
    894894
     
    902902        TRACE("(%p)->()\n",sl);
    903903        shell32_ObjCount++;
    904         return bUnicode ? (IShellLink *) &(sl->lpvtblw) : (IShellLink *)sl;
    905 }
    906 
    907 
     904        return bUnicode ? (IShellLinkA *) &(sl->lpvtblw) : (IShellLinkA *)sl;
     905}
     906
     907
Note: See TracChangeset for help on using the changeset viewer.