FileTypeRegistrar.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. #pragma once
  2. #if defined(_WIN64)
  3. #include "IFileTypeRegistrar_64.h"
  4. #else
  5. #include "IFileTypeRegistrar_32.h"
  6. #endif
  7. class FileTypeRegistrar : public IFileTypeRegistrar
  8. {
  9. public:
  10. FileTypeRegistrar();
  11. /* IUnknown */
  12. HRESULT STDMETHODCALLTYPE QueryInterface(
  13. /* [in] */ REFIID riid,
  14. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject
  15. );
  16. ULONG STDMETHODCALLTYPE AddRef(void);
  17. ULONG STDMETHODCALLTYPE Release(void);
  18. /* Stuff we define */
  19. HRESULT STDMETHODCALLTYPE RegisterMIMEType(
  20. /* [in, string] */ LPCWSTR mimeType,
  21. /* [in, string] */ LPCWSTR programName,
  22. /* [in, string] */ LPCWSTR extension,
  23. BOOL netscapeOnly
  24. );
  25. HRESULT STDMETHODCALLTYPE RegisterCDPlayer(
  26. /* [in, string] */ LPCWSTR programName
  27. );
  28. HRESULT STDMETHODCALLTYPE UnregisterCDPlayer(
  29. /* [in, string] */ LPCWSTR programName
  30. );
  31. HRESULT STDMETHODCALLTYPE RegisterType(
  32. /* [in, string] */ LPCWSTR extension,
  33. /* [in, string] */ LPCWSTR which_str,
  34. /* [in, string] */ LPCWSTR prog_name
  35. );
  36. HRESULT STDMETHODCALLTYPE UnregisterType(
  37. /* [in, string] */ LPCWSTR extension,
  38. /* [in, string] */ LPCWSTR which_str,
  39. /* [in, string] */ LPCWSTR prog_name,
  40. /*[in]*/ int iconNumber
  41. );
  42. HRESULT STDMETHODCALLTYPE AddDirectoryContext(
  43. /* [in, string] */ LPCWSTR programName,
  44. /* [in, string] */ LPCWSTR which_str,
  45. /* [in, string] */ LPCWSTR description
  46. );
  47. HRESULT STDMETHODCALLTYPE RemoveDirectoryContext(
  48. /* [in, string] */ LPCWSTR which_str
  49. );
  50. HRESULT STDMETHODCALLTYPE AddAgent(
  51. /* [in, string] */ LPCWSTR agentFilename
  52. );
  53. HRESULT STDMETHODCALLTYPE RemoveAgent();
  54. HRESULT STDMETHODCALLTYPE RegisterMediaPlayer(
  55. DWORD accessEnabled,
  56. /* [in, string] */ LPCWSTR programName,
  57. /* [in, string] */ LPCWSTR prog_name,
  58. int iconNumber
  59. );
  60. HRESULT STDMETHODCALLTYPE RegisterMediaPlayerProtocol(LPCWSTR protocol, LPCWSTR prog_name);
  61. HRESULT STDMETHODCALLTYPE UnregisterMediaPlayerProtocol(LPCWSTR protocol, LPCWSTR prog_name);
  62. HRESULT STDMETHODCALLTYPE SetupFileType(
  63. /* [in, string] */ LPCWSTR programName,
  64. /* [in, string] */ LPCWSTR winamp_file,
  65. /* [in, string] */ LPCWSTR name,
  66. int iconNumber,
  67. /* [in, string] */ LPCWSTR defaultShellCommand,
  68. /* [in, string] */ LPCWSTR iconPath
  69. );
  70. HRESULT STDMETHODCALLTYPE SetupShell(
  71. /* [in, string] */ LPCWSTR commandLine,
  72. /* [in, string] */ LPCWSTR winamp_file,
  73. /* [in, string] */ LPCWSTR description,
  74. /* [in, string] */ LPCWSTR commandName,
  75. /* [in, string] */ LPCWSTR dragAndDropGUID
  76. );
  77. HRESULT STDMETHODCALLTYPE RemoveShell(
  78. /* [in, string] */ LPCWSTR winamp_file,
  79. /* [in, string] */ LPCWSTR commandName
  80. );
  81. HRESULT STDMETHODCALLTYPE SetupDefaultFileType(
  82. /* [in, string] */ LPCWSTR winamp_file,
  83. /* [in, string] */ LPCWSTR defaultShellCommand
  84. );
  85. HRESULT STDMETHODCALLTYPE RegisterTypeShell(
  86. /* [in, string] */ LPCWSTR programName,
  87. /* [in, string] */ LPCWSTR which_file,
  88. /* [in, string] */ LPCWSTR description,
  89. int iconNumber,
  90. /* [in, string] */ LPCWSTR commandName
  91. );
  92. HRESULT STDMETHODCALLTYPE RegisterGUID(
  93. /* [in, string] */ LPCWSTR programName,
  94. /* [in, string] */ LPCWSTR guidString
  95. );
  96. HRESULT STDMETHODCALLTYPE RegisterDVDPlayer(
  97. /* [in, string] */ LPCWSTR programName,
  98. int iconNumber,
  99. /* [in, string] */ LPCWSTR which_file,
  100. /* [in, string] */ LPCWSTR commandName,
  101. /* [in, string] */ LPCWSTR provider,
  102. /* [in, string] */ LPCWSTR description
  103. );
  104. HRESULT STDMETHODCALLTYPE InstallItem(
  105. LPCWSTR sourceFile,
  106. LPCWSTR destinationFolder,
  107. LPCWSTR destinationFilename
  108. );
  109. HRESULT STDMETHODCALLTYPE DeleteItem(
  110. LPCWSTR file
  111. );
  112. HRESULT STDMETHODCALLTYPE RenameItem(
  113. LPCWSTR oldFile,
  114. LPCWSTR newFile,
  115. BOOL force
  116. );
  117. HRESULT STDMETHODCALLTYPE CleanupDirectory(
  118. LPCWSTR directory
  119. );
  120. HRESULT STDMETHODCALLTYPE MoveDirectoryContents(
  121. LPCWSTR oldDirectory,
  122. LPCWSTR newDirectory
  123. );
  124. HRESULT STDMETHODCALLTYPE WriteProKey(LPCWSTR name, LPCWSTR key);
  125. HRESULT STDMETHODCALLTYPE WriteClientUIDKey(LPCWSTR path, LPCWSTR uid_str);
  126. HRESULT STDMETHODCALLTYPE RegisterProtocol(LPCWSTR protocol, LPCWSTR command, LPCWSTR icon);
  127. HRESULT STDMETHODCALLTYPE RegisterCapability(const wchar_t *programName, const wchar_t *winamp_file, const wchar_t *extension);
  128. //private:
  129. volatile ULONG refCount;
  130. };