NCContextMenuRegHandler.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) 2015 Daniel Molkentin <danimo@owncloud.com>. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. #ifndef NCCONTEXTMENUREGHANDLER_H
  15. #define NCCONTEXTMENUREGHANDLER_H
  16. #pragma once
  17. #include <windows.h>
  18. class __declspec(dllexport) NCContextMenuRegHandler
  19. {
  20. public:
  21. static HRESULT MakeRegistryEntries(const CLSID& clsid, PCWSTR fileType);
  22. static HRESULT RegisterCOMObject(PCWSTR modulePath, PCWSTR friendlyName, const CLSID& clsid);
  23. static HRESULT RemoveRegistryEntries(PCWSTR friendlyName);
  24. static HRESULT UnregisterCOMObject(const CLSID& clsid);
  25. static HRESULT RegisterInprocServer(PCWSTR pszModule, const CLSID& clsid, PCWSTR pszFriendlyName, PCWSTR pszThreadModel);
  26. static HRESULT UnregisterInprocServer(const CLSID& clsid);
  27. static HRESULT RegisterShellExtContextMenuHandler(PCWSTR pszFileType, const CLSID& clsid, PCWSTR pszFriendlyName);
  28. static HRESULT UnregisterShellExtContextMenuHandler(PCWSTR pszFileType, PCWSTR pszFriendlyName);
  29. };
  30. #endif //NCCONTEXTMENUREGHANDLER_H