Cleanup Windows shell extensions
authorHannah von Reth <hannah.vonreth@owncloud.com>
Mon, 17 Aug 2020 18:35:39 +0000 (20:35 +0200)
committerMichael Schuster <michael@schuster.ms>
Thu, 20 Aug 2020 16:50:05 +0000 (18:50 +0200)
Signed-off-by: Michael Schuster <michael@schuster.ms>
29 files changed:
shell_integration/windows/OCContextMenu/CMakeLists.txt
shell_integration/windows/OCContextMenu/OCClientInterface.cpp
shell_integration/windows/OCContextMenu/OCContextMenu.cpp
shell_integration/windows/OCContextMenu/OCContextMenuFactory.cpp
shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.cpp
shell_integration/windows/OCContextMenu/OCContextMenuRegHandler.h
shell_integration/windows/OCContextMenu/dllmain.cpp
shell_integration/windows/OCContextMenu/stdafx.cpp [deleted file]
shell_integration/windows/OCContextMenu/stdafx.h [deleted file]
shell_integration/windows/OCContextMenu/targetver.h [deleted file]
shell_integration/windows/OCOverlays/CMakeLists.txt
shell_integration/windows/OCOverlays/DllMain.cpp
shell_integration/windows/OCOverlays/OCOverlay.cpp
shell_integration/windows/OCOverlays/OCOverlay.h
shell_integration/windows/OCOverlays/OCOverlayFactory.cpp
shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.cpp
shell_integration/windows/OCOverlays/OCOverlayRegistrationHandler.h
shell_integration/windows/OCOverlays/OverlayConstants.h.original [deleted file]
shell_integration/windows/OCOverlays/stdafx.cpp [deleted file]
shell_integration/windows/OCOverlays/stdafx.h [deleted file]
shell_integration/windows/OCUtil/CMakeLists.txt
shell_integration/windows/OCUtil/CommunicationSocket.cpp
shell_integration/windows/OCUtil/FileUtil.cpp
shell_integration/windows/OCUtil/RegistryUtil.cpp
shell_integration/windows/OCUtil/RemotePathChecker.cpp
shell_integration/windows/OCUtil/StringUtil.cpp
shell_integration/windows/OCUtil/StringUtil.h
shell_integration/windows/OCUtil/stdafx.cpp [deleted file]
shell_integration/windows/OCUtil/stdafx.h [deleted file]

index badfbb638b582be2cf1ec404a6bc58033d48a978..74c12621b84de0862016f0b4a5b8ff74332875fb 100644 (file)
@@ -4,7 +4,6 @@ add_library(OCContextMenu MODULE
     OCContextMenu.cpp
     OCContextMenuFactory.cpp
     OCContextMenuRegHandler.cpp
-    stdafx.cpp
     OCContextMenu.rc
     OCContextMenu.def
 )
index f855310e57d60a4e481540dfd8a4fc297389e77c..ad7a35564d98feb4ad6b85222cd01d0a3ad7ef5f 100644 (file)
@@ -12,8 +12,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include "OCClientInterface.h"
 
 #include "CommunicationSocket.h"
index a5cab4ff1c1ce09b3e22eae4f5bb2dc04d03871b..1e9168af50d1e5b6dff30aef0784c41a111ce255 100644 (file)
@@ -12,8 +12,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include "OCContextMenu.h"
 #include "OCClientInterface.h"
 
@@ -21,6 +19,7 @@
 #include <shlwapi.h>
 #include <shellapi.h>
 #include <StringUtil.h>
+#include <strsafe.h>
 
 extern long g_cDllRef;
 
index e9652b3c7161a6ea09a092c9bcf8aae0ec65d04a..e3e6ff6b6404e57707b2fedcc8ee595232525e74 100644 (file)
@@ -12,8 +12,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include "OCContextMenuFactory.h"
 #include "OCContextMenu.h"
 #include <new>
index 38e1d5e06890342994bd6464890b0661b6381667..43fb46a3b3a0e36c88f79a7429d76485041cd4c2 100644 (file)
@@ -12,8 +12,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include "OCContextMenuRegHandler.h"
 #include "RegDelnode.h"
 #include <strsafe.h>
index 061ee545da819f73a9fc63fea82349c5565b95f5..91c2c9e81cad102210a8160625c51d2f4906c365 100644 (file)
@@ -18,7 +18,7 @@
 
 #pragma once
 
-#include "stdafx.h"
+#include <windows.h>
 
 class __declspec(dllexport) OCContextMenuRegHandler
 {
index 8cd31fea40b14a9b588ac7f4cf2ba666234a2749..924f3a4e524d2fdd51667ffa465ab4df6b316d2f 100644 (file)
@@ -12,8 +12,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include <windows.h>
 #include <Guiddef.h>
 #include "OCContextMenuRegHandler.h"
diff --git a/shell_integration/windows/OCContextMenu/stdafx.cpp b/shell_integration/windows/OCContextMenu/stdafx.cpp
deleted file mode 100644 (file)
index 2a64947..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// OCContextMenu.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/shell_integration/windows/OCContextMenu/stdafx.h b/shell_integration/windows/OCContextMenu/stdafx.h
deleted file mode 100644 (file)
index e8b07f4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-#include "targetver.h"
-
-#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
-// Windows Header Files:
-#include <windows.h>
-#include <memory>
-#include <strsafe.h>
-
-
-// TODO: reference additional headers your program requires here
diff --git a/shell_integration/windows/OCContextMenu/targetver.h b/shell_integration/windows/OCContextMenu/targetver.h
deleted file mode 100644 (file)
index e233d35..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-
-// Including SDKDDKVer.h defines the highest available Windows platform.
-
-// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
-// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
-
-// Note: Here was a #define for windows target version
-// e.g. WINVER / _WIN32_WINNT, see https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
-// Unnecessary because we define both in desktop/CMakeLists.txt
-
-#include <SDKDDKVer.h>
index 13526b74905137a2b8aab9a6b2d78e71cba6e577..60d4a37480bbf24e651b194373917efba925ebe6 100644 (file)
@@ -3,7 +3,6 @@ add_library(OCOverlays MODULE
     OCOverlay.cpp
     OCOverlayFactory.cpp
     OCOverlayRegistrationHandler.cpp
-    stdafx.cpp
     OCOverlay.rc
     OCOverlays.def
 )
index 00195b6e51e852b13fa4c89a5d7c49a837b95a3f..c52f367f5759aedbfe8f2c994cdee9997f037cd6 100644 (file)
  * details.
  */
 
-#include "stdafx.h"
-
 #include "OCOverlayRegistrationHandler.h"
 #include "OCOverlayFactory.h"
+#include "OverlayConstants.h"
 
 HINSTANCE instanceHandle = nullptr;
 
index f7ff64f5b3d1762f18a75c12093ff93977215d70..cd36d605d06e4e7d2514a261620140c1c65a4dab 100644 (file)
@@ -12,8 +12,6 @@
  * details.
  */
 
-#include "stdafx.h"
-
 #include "OCOverlay.h"
 
 #include "OCOverlayFactory.h"
@@ -23,8 +21,6 @@
 #include "UtilConstants.h"
 #include "RemotePathChecker.h"
 
-#include "resource.h"
-
 #include <algorithm>
 #include <iostream>
 #include <fstream>
index af1aaf696be5098867f36b685c8e04f7cf1b5b43..80aaa7882d4229bd9a769d8b845c1ebe32e5a05a 100644 (file)
@@ -17,6 +17,8 @@
 
 #pragma once
 
+#include <shlobj.h>
+
 class OCOverlay : public IShellIconOverlayIdentifier
 
 {
index a1c095f920894fa30cfa1d4a46893d0d6a96bdcf..58b569e1ccee7a5101fa96c8d14cde914c6af056 100644 (file)
@@ -12,7 +12,8 @@
  * details.
  */
 
-#include "stdafx.h"
+#include <windows.h>
+#include <new>
 
 #include "OCOverlayFactory.h"
 #include "OCOverlay.h"
index d7d1fa40abea83a94f7d2ae5540978692e5e8123..1b7452a43e2714a3ac205848b7fdf5408fb7a23d 100644 (file)
  * details.
  */
 
-#include "stdafx.h"
-
 #include "OCOverlayRegistrationHandler.h"
+#include "OverlayConstants.h"
 
+#include <windows.h>
 #include <iostream>
 #include <fstream>
 
index 098ac6921113d81564f2ded8569932e2b1423404..2ab8f702f4e0f84b15a52f73026edcc90caf6b16 100644 (file)
@@ -17,6 +17,8 @@
 
 #pragma once
 
+#include <windows.h>
+
 class __declspec(dllexport) OCOverlayRegistrationHandler 
 {
     public:
diff --git a/shell_integration/windows/OCOverlays/OverlayConstants.h.original b/shell_integration/windows/OCOverlays/OverlayConstants.h.original
deleted file mode 100644 (file)
index e244e15..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or modify it under
- * the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- */
-
-#define        OVERLAY_ID                                      [$overlay.id$]
-#define OVERLAY_GUID                           L"[$overlay.guid$]"
-#define OVERLAY_NAME                           L"[$overlay.name$]"
-
-#define REGISTRY_OVERLAY_KEY           L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellIconOverlayIdentifiers"
-#define REGISTRY_CLSID                         L"CLSID"
-#define REGISTRY_IN_PROCESS            L"InprocServer32"
-#define REGISTRY_THREADING             L"ThreadingModel"
-#define REGISTRY_APARTMENT             L"Apartment"
-#define REGISTRY_VERSION               L"Version"
-#define REGISTRY_VERSION_NUMBER                L"1.0"
-
-//Registry values for running
-#define REGISTRY_ENABLE_OVERLAY                L"EnableOverlay"
-
-#define GET_FILE_OVERLAY_ID            L"getFileIconId"
-
-#define PORT                           33001
diff --git a/shell_integration/windows/OCOverlays/stdafx.cpp b/shell_integration/windows/OCOverlays/stdafx.cpp
deleted file mode 100644 (file)
index fd4f341..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "stdafx.h"
diff --git a/shell_integration/windows/OCOverlays/stdafx.h b/shell_integration/windows/OCOverlays/stdafx.h
deleted file mode 100644 (file)
index 5eacb45..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- *  Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
- *  
- *  This library is free software; you can redistribute it and/or modify it under
- *  the terms of the GNU Lesser General Public License as published by the Free
- *  Software Foundation; either version 2.1 of the License, or (at your option)
- *  any later version.
- *  
- *  This library is distributed in the hope that it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- *  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- *  details.
- */
-
-#define WIN32_LEAN_AND_MEAN
-
-// Note: Here was a #define for windows target version
-// e.g. WINVER / _WIN32_WINNT, see https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
-// Unnecessary because we define both in desktop/CMakeLists.txt
-
-#include "CommunicationSocket.h"
-#include "RegistryUtil.h"
-#include "OverlayConstants.h"
-#include "FileUtil.h"
-
-#include <string>
-#include <new>
-#include <Guiddef.h>
-#include <windows.h>
-#include <Shlwapi.h>
-#include <shlobj.h>
-#include <unknwn.h> 
-#include <vector>
-#include <strsafe.h>
index d353422f4c49ab5be85cead76141d954996ef87b..cf31dd3da080549f729223240521c68ce7caaace 100644 (file)
@@ -3,7 +3,6 @@ add_library(OCUtil STATIC
     FileUtil.cpp
     RegistryUtil.cpp
     RemotePathChecker.cpp
-    stdafx.cpp
     StringUtil.cpp
     OCUtil.rc
 )
index 649a9a145f19baa1c2d0b2d41af61762b53092b4..10f95159eb04198199feebbcad5536365ec7375a 100644 (file)
@@ -12,8 +12,6 @@
  * details.
  */
 
-#include "stdafx.h"
-
 #include "CommunicationSocket.h"
 #include "UtilConstants.h"
 #include "StringUtil.h"
index 9bb27af9208af5d0dfecd6bf685384ea5c3f897f..6230e17d5e0058b195d88991c984f3488c9ec2fa 100644 (file)
@@ -12,8 +12,6 @@
  * details.
  */
 
-#include "stdafx.h"
-
 #include "FileUtil.h"
 #include "RegistryUtil.h"
 #include "UtilConstants.h"
index 29a8c89030f02e965e3a225f351a2df3d29bb8ae..b5be8f2f69540d840798581fc59f99c68c8be2fb 100644 (file)
@@ -12,7 +12,7 @@
  * details.
  */
 
-#include "stdafx.h"
+#include <windows.h>
 
 #include "RegistryUtil.h"
 
index 99b46d3bacfea2cdd3f5174c09ab4eae0ba6303c..5d004d567d28629d8e916f7f7e2dd83eaa4adb21 100644 (file)
@@ -11,8 +11,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include "CommunicationSocket.h"
 
 #include "RemotePathChecker.h"
index bd056ba683ea2ddf59a643d931733b291f8b2d51..e23030e02b6624f2e6f497aaeb18c6d1f0b97d3c 100644 (file)
@@ -11,8 +11,6 @@
 * details.
 */
 
-#include "stdafx.h"
-
 #include <locale>
 #include <string>
 #include <codecvt>
index c0cef5851b20050c9500da9c5d6c05c695bc3cab..180d7c80a2097538a8cf620cceb6e5eef2e1e9d4 100644 (file)
@@ -16,6 +16,7 @@
 
 #pragma once
 
+#include <windows.h>
 #include <string>
 #include <cassert>
 
diff --git a/shell_integration/windows/OCUtil/stdafx.cpp b/shell_integration/windows/OCUtil/stdafx.cpp
deleted file mode 100644 (file)
index fd4f341..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include "stdafx.h"
diff --git a/shell_integration/windows/OCUtil/stdafx.h b/shell_integration/windows/OCUtil/stdafx.h
deleted file mode 100644 (file)
index 532ea3e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#define WIN32_LEAN_AND_MEAN
-
-// Note: Here was a #define for windows target version
-// e.g. WINVER / _WIN32_WINNT, see https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
-// Unnecessary because we define both in desktop/CMakeLists.txt
-
-#include <windows.h>