ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

shelllink.h
Go to the documentation of this file.
00001 /*
00002  *
00003  *      Copyright 1997  Marcus Meissner
00004  *      Copyright 1998  Juergen Schmied
00005  *      Copyright 2005  Mike McCormack
00006  *      Copyright 2009  Andrew Hill
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00021  *
00022  */
00023 
00024 #ifndef _SHELLLINK_H_
00025 #define _SHELLLINK_H_
00026 
00027 class CShellLink :
00028     public CComCoClass<CShellLink, &CLSID_ShellLink>,
00029     public CComObjectRootEx<CComMultiThreadModelNoCS>,
00030     public IShellLinkA,
00031     public IShellLinkW,
00032     public IPersistFile,
00033     public IPersistStream,
00034     public IShellLinkDataList,
00035     public IShellExtInit,
00036     public IContextMenu,
00037     public IObjectWithSite,
00038     public IShellPropSheetExt
00039 {
00040 public:
00041     /* link file formats */
00042 
00043     #include "pshpack1.h"
00044 
00045     struct volume_info
00046     {
00047         DWORD       type;
00048         DWORD       serial;
00049         WCHAR       label[12];  /* assume 8.3 */
00050     };
00051 
00052     #include "poppack.h"
00053 
00054 private:
00055     /* data structures according to the information in the link */
00056     LPITEMIDLIST    pPidl;
00057     WORD        wHotKey;
00058     SYSTEMTIME  time1;
00059     SYSTEMTIME  time2;
00060     SYSTEMTIME  time3;
00061 
00062     DWORD         iShowCmd;
00063     LPWSTR        sIcoPath;
00064     INT           iIcoNdx;
00065     LPWSTR        sPath;
00066     LPWSTR        sArgs;
00067     LPWSTR        sWorkDir;
00068     LPWSTR        sDescription;
00069     LPWSTR        sPathRel;
00070     LPWSTR        sProduct;
00071     LPWSTR        sComponent;
00072     volume_info   volume;
00073     LPWSTR        sLinkPath;
00074     BOOL          bRunAs;
00075     BOOL          bDirty;
00076     INT           iIdOpen;  /* id of the "Open" entry in the context menu */
00077     CComPtr<IUnknown>       site;
00078 public:
00079     CShellLink();
00080     ~CShellLink();
00081     LPWSTR ShellLink_GetAdvertisedArg(LPCWSTR str);
00082     HRESULT ShellLink_SetAdvertiseInfo(LPCWSTR str);
00083     static INT_PTR CALLBACK SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
00084 
00085     // IPersistFile
00086     virtual HRESULT WINAPI GetClassID(CLSID *pclsid);
00087     virtual HRESULT WINAPI IsDirty();
00088     virtual HRESULT WINAPI Load(LPCOLESTR pszFileName, DWORD dwMode);
00089     virtual HRESULT WINAPI Save(LPCOLESTR pszFileName, BOOL fRemember);
00090     virtual HRESULT WINAPI SaveCompleted(LPCOLESTR pszFileName);
00091     virtual HRESULT WINAPI GetCurFile(LPOLESTR *ppszFileName);
00092 
00093     // IPersistStream
00094 //  virtual WINAPI HRESULT GetClassID(CLSID *pclsid);
00095 //  virtual HRESULT WINAPI IsDirty();
00096     virtual HRESULT WINAPI Load(IStream *stm);
00097     virtual HRESULT WINAPI Save(IStream *stm, BOOL fClearDirty);
00098     virtual HRESULT WINAPI GetSizeMax(ULARGE_INTEGER *pcbSize);
00099 
00100     // IShellLinkA
00101     virtual HRESULT WINAPI GetPath(LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags);
00102     virtual HRESULT WINAPI GetIDList(LPITEMIDLIST * ppidl);
00103     virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl);
00104     virtual HRESULT WINAPI GetDescription(LPSTR pszName,INT cchMaxName);
00105     virtual HRESULT WINAPI SetDescription(LPCSTR pszName);
00106     virtual HRESULT WINAPI GetWorkingDirectory(LPSTR pszDir,INT cchMaxPath);
00107     virtual HRESULT WINAPI SetWorkingDirectory(LPCSTR pszDir);
00108     virtual HRESULT WINAPI GetArguments(LPSTR pszArgs,INT cchMaxPath);
00109     virtual HRESULT WINAPI SetArguments(LPCSTR pszArgs);
00110     virtual HRESULT WINAPI GetHotkey(WORD *pwHotkey);
00111     virtual HRESULT WINAPI SetHotkey(WORD wHotkey);
00112     virtual HRESULT WINAPI GetShowCmd(INT *piShowCmd);
00113     virtual HRESULT WINAPI SetShowCmd(INT iShowCmd);
00114     virtual HRESULT WINAPI GetIconLocation(LPSTR pszIconPath,INT cchIconPath,INT *piIcon);
00115     virtual HRESULT WINAPI SetIconLocation(LPCSTR pszIconPath,INT iIcon);
00116     virtual HRESULT WINAPI SetRelativePath(LPCSTR pszPathRel, DWORD dwReserved);
00117     virtual HRESULT WINAPI Resolve(HWND hwnd, DWORD fFlags);
00118     virtual HRESULT WINAPI SetPath(LPCSTR pszFile);
00119 
00120     // IShellLinkW
00121     virtual HRESULT WINAPI GetPath(LPWSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags);
00122 //  virtual HRESULT WINAPI GetIDList(LPITEMIDLIST *ppidl);
00123 //  virtual HRESULT WINAPI SetIDList(LPCITEMIDLIST pidl);
00124     virtual HRESULT WINAPI GetDescription(LPWSTR pszName, INT cchMaxName);
00125     virtual HRESULT WINAPI SetDescription(LPCWSTR pszName);
00126     virtual HRESULT WINAPI GetWorkingDirectory(LPWSTR pszDir, INT cchMaxPath);
00127     virtual HRESULT WINAPI SetWorkingDirectory(LPCWSTR pszDir);
00128     virtual HRESULT WINAPI GetArguments(LPWSTR pszArgs,INT cchMaxPath);
00129     virtual HRESULT WINAPI SetArguments(LPCWSTR pszArgs);
00130 //  virtual HRESULT WINAPI GetHotkey(WORD *pwHotkey);
00131 //  virtual HRESULT WINAPI SetHotkey(WORD wHotkey);
00132 //  virtual HRESULT WINAPI GetShowCmd(INT *piShowCmd);
00133 //  virtual HRESULT WINAPI SetShowCmd(INT iShowCmd);
00134     virtual HRESULT WINAPI GetIconLocation(LPWSTR pszIconPath,INT cchIconPath,INT *piIcon);
00135     virtual HRESULT WINAPI SetIconLocation(LPCWSTR pszIconPath,INT iIcon);
00136     virtual HRESULT WINAPI SetRelativePath(LPCWSTR pszPathRel, DWORD dwReserved);
00137 //  virtual HRESULT WINAPI Resolve(HWND hwnd, DWORD fFlags);
00138     virtual HRESULT WINAPI SetPath(LPCWSTR pszFile);
00139 
00140     // IShellLinkDataList
00141     virtual HRESULT WINAPI AddDataBlock(void *pDataBlock);
00142     virtual HRESULT WINAPI CopyDataBlock(DWORD dwSig, void **ppDataBlock);
00143     virtual HRESULT WINAPI RemoveDataBlock(DWORD dwSig);
00144     virtual HRESULT WINAPI GetFlags(DWORD *pdwFlags);
00145     virtual HRESULT WINAPI SetFlags(DWORD dwFlags);
00146 
00147     // IShellExtInit
00148     virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
00149 
00150     // IContextMenu
00151     virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
00152     virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
00153     virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax);
00154 
00155     // IShellPropSheetExt
00156     virtual HRESULT WINAPI AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
00157     virtual HRESULT WINAPI ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam);
00158 
00159     // IObjectWithSite
00160     virtual HRESULT WINAPI SetSite(IUnknown *punk);
00161     virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite);
00162 
00163 DECLARE_REGISTRY_RESOURCEID(IDR_SHELLLINK)
00164 DECLARE_NOT_AGGREGATABLE(CShellLink)
00165 
00166 DECLARE_PROTECT_FINAL_CONSTRUCT()
00167 
00168 BEGIN_COM_MAP(CShellLink)
00169     COM_INTERFACE_ENTRY2_IID(IID_IPersist, IPersist, IPersistFile)
00170     COM_INTERFACE_ENTRY_IID(IID_IPersistFile, IPersistFile)
00171     COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
00172     COM_INTERFACE_ENTRY_IID(IID_IShellLinkA, IShellLinkA)
00173     COM_INTERFACE_ENTRY_IID(IID_IShellLinkW, IShellLinkW)
00174     COM_INTERFACE_ENTRY_IID(IID_IShellLinkDataList, IShellLinkDataList)
00175     COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
00176     COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
00177     COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
00178     COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite)
00179 END_COM_MAP()
00180 };
00181 
00182 #endif // _SHELLLINK_H_

Generated on Mon May 28 2012 04:26:04 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.