Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.6 KiB

  1. #ifndef FTASSOC_H
  2. #define FTASSOC_H
  3. #include "ascstr.h"
  4. #include "regsprtb.h"
  5. class CFTAssocInfo : public IAssocInfo, private CRegSupportBuf
  6. {
  7. public:
  8. CFTAssocInfo();
  9. // IUnknown methods
  10. STDMETHOD(QueryInterface)(REFIID riid, PVOID* ppv);
  11. STDMETHOD_(ULONG, AddRef)();
  12. STDMETHOD_(ULONG,Release)();
  13. // IAssocInfo methods
  14. // Init
  15. STDMETHOD(Init)(AIINIT aiinitFlags, LPTSTR pszStr);
  16. STDMETHOD(InitComplex)(AIINIT aiinitFlags1, LPTSTR pszStr1,
  17. AIINIT aiinitFlags2, LPTSTR pszStr2);
  18. // Get
  19. STDMETHOD(GetString)(AISTR aistrFlags, LPTSTR pszStr, DWORD* cchStr);
  20. STDMETHOD(GetDWORD)(AIDWORD aidwordFlags, DWORD* pdwdata);
  21. STDMETHOD(GetBOOL)(AIDWORD aidwordFlags, BOOL* pBool);
  22. STDMETHOD(GetData)(AIDWORD aidataFlags, PBYTE pbData, DWORD* pcbData);
  23. // Set
  24. STDMETHOD(SetString)(AISTR aistrFlags, LPTSTR pszStr);
  25. STDMETHOD(SetDWORD)(AIDWORD aidwordFlags, DWORD dwData);
  26. STDMETHOD(SetBOOL)(AIDWORD aiboolFlags, BOOL fBool);
  27. STDMETHOD(SetData)(AIDWORD aidataFlags, PBYTE pbData, DWORD cbData);
  28. // Create
  29. STDMETHOD(Create)();
  30. // Delete
  31. STDMETHOD(DelString)(AISTR aistrFlags);
  32. STDMETHOD(Delete)(AIALL aiallFlags);
  33. protected:
  34. HRESULT _IsBrowseInPlace(BOOL* pfBool);
  35. HRESULT _SetBrowseInPlace(BOOL fBool);
  36. HRESULT _IsBrowseInPlaceEnabled(BOOL* pfBool);
  37. HRESULT _IsEditFlagSet(DWORD dwMask, BOOL* pfBool);
  38. HRESULT _SetEditFlagSet(DWORD dwMask, BOOL fBool);
  39. HRESULT _CreateProgID();
  40. HRESULT _GetProgIDActionAttributes(DWORD* pdwAttributes);
  41. HRESULT _GetProgIDEditFlags(DWORD* pdwEditFlags);
  42. HRESULT _GetOpenWithInfo(LPTSTR pszStr, DWORD* pcchStr);
  43. HRESULT _ExtIsAssociated(BOOL* pfIsAssociated);
  44. HRESULT _GetExtDocIcon(LPTSTR pszExt, BOOL fSmall, int* piIcon);
  45. HRESULT _GetProgIDDocIcon(BOOL fSmall, int* piIcon);
  46. HRESULT _GetAppIcon(BOOL fSmall, int* piIcon);
  47. HRESULT _GetIconLocation(LPTSTR pszStr, DWORD* pcchStr);
  48. HRESULT _SetIconLocation(LPTSTR pszStr);
  49. HRESULT _GetProgIDDefaultAction(LPTSTR pszStr, DWORD* pcchStr);
  50. HRESULT _SetProgIDDefaultAction(LPTSTR pszStr);
  51. HRESULT _GetProgIDDescr(LPTSTR pszProgIDDescr, DWORD* pcchProgIDdescr);
  52. HRESULT __InitImageLists();
  53. protected:
  54. HRESULT _OpenSubKey(LPTSTR pszSubKey, REGSAM samDesired, HKEY* phKey);
  55. protected:
  56. TCHAR _szInitStr1[MAX_FTMAX];
  57. AIINIT _aiinitFlags1;
  58. TCHAR _szInitStr2[MAX_FTMAX];
  59. AIINIT _aiinitFlags2;
  60. static HIMAGELIST _himlSysSmall;
  61. static HIMAGELIST _himlSysLarge;
  62. private:
  63. LONG _cRef;
  64. };
  65. #endif //FTASSOC_H