diff --git a/src/AspNetCoreModuleV2/AspNetCore/AspNetCore.vcxproj b/src/AspNetCoreModuleV2/AspNetCore/AspNetCore.vcxproj index 77e0442946..db4a1edf2d 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/AspNetCore.vcxproj +++ b/src/AspNetCoreModuleV2/AspNetCore/AspNetCore.vcxproj @@ -76,7 +76,6 @@ - NotUsing Level4 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;ASPNETCOREMODULE_EXPORTS;%(PreprocessorDefinitions) @@ -98,6 +97,7 @@ true true stdcpp17 + precomp.hxx Windows @@ -112,7 +112,6 @@ - NotUsing Level4 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;ASPNETCOREMODULE_EXPORTS;%(PreprocessorDefinitions) @@ -134,6 +133,7 @@ true true stdcpp17 + precomp.hxx Windows @@ -170,6 +170,7 @@ true true stdcpp17 + precomp.hxx Windows @@ -208,6 +209,7 @@ true true stdcpp17 + precomp.hxx Windows @@ -239,6 +241,12 @@ + + Create + Create + Create + Create + diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationinfo.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationinfo.h index c53041a664..ecb85b0355 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationinfo.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationinfo.h @@ -3,7 +3,7 @@ #pragma once -#include "precomp.hxx" +#include #include "hostfxroptions.h" #include "appoffline.h" @@ -13,6 +13,7 @@ #include "aspnetcore_shim_config.h" #include "iapplication.h" #include "SRWSharedLock.h" +#include "ntassert.h" #define API_BUFFER_TOO_SMALL 0x80008098 diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationmanager.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationmanager.h index 06c168d4b9..dac98163f5 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationmanager.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/applicationmanager.h @@ -3,8 +3,6 @@ #pragma once -#include "precomp.hxx" - #include "applicationinfo.h" #include "multisz.h" #include "filewatcher.h" diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/appoffline.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/appoffline.h index 581292fdba..0f985ca64d 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/appoffline.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/appoffline.h @@ -3,7 +3,8 @@ #pragma once -#include "precomp.hxx" +#include "stringa.h" +#include "stringu.h" class APP_OFFLINE_HTM { diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/aspnetcore_shim_config.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/aspnetcore_shim_config.h index 401efa3010..7560df38d1 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/aspnetcore_shim_config.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/aspnetcore_shim_config.h @@ -3,8 +3,10 @@ #pragma once -#include "precomp.hxx" -#include +#include +#include + +#include "stringu.h" #define CS_ASPNETCORE_SECTION L"system.webServer/aspNetCore" #define CS_ASPNETCORE_PROCESS_EXE_PATH L"processPath" diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/filewatcher.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/filewatcher.h index 8290b4b118..8bcd746326 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/filewatcher.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/filewatcher.h @@ -3,20 +3,12 @@ #pragma once -#include "precomp.hxx" +#include + +#include "stringu.h" #define FILE_WATCHER_SHUTDOWN_KEY (ULONG_PTR)(-1) #define FILE_WATCHER_ENTRY_BUFFER_SIZE 4096 -#ifndef CONTAINING_RECORD -// -// Calculate the address of the base of the structure given its type, and an -// address of a field within the structure. -// - -#define CONTAINING_RECORD(address, type, field) \ - ((type *)((PCHAR)(address)-(ULONG_PTR)(&((type *)0)->field))) - -#endif // !CONTAINING_RECORD #define FILE_NOTIFY_VALID_MASK 0x00000fff #define FILE_WATCHER_ENTRY_SIGNATURE ((DWORD) 'FWES') #define FILE_WATCHER_ENTRY_SIGNATURE_FREE ((DWORD) 'sewf') diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/globalmodule.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/globalmodule.h index a21ea907d5..0a7b38f0ff 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/globalmodule.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/globalmodule.h @@ -3,8 +3,6 @@ #pragma once -#include "precomp.hxx" - #include "applicationmanager.h" class ASPNET_CORE_GLOBAL_MODULE : public CGlobalModule diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/precomp.hxx b/src/AspNetCoreModuleV2/AspNetCore/Inc/precomp.hxx index 6e6e2619e3..b0ee0b7e32 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/precomp.hxx +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/precomp.hxx @@ -16,40 +16,8 @@ #include #include #include - #include "stringu.h" -#include "stringa.h" - -#include "ntassert.h" -#include "dbgutil.h" - -#include "aspnetcore_msg.h" -#include "resources.h" - -#include - -FORCEINLINE -DWORD -WIN32_FROM_HRESULT( - HRESULT hr -) -{ - if ((FAILED(hr)) && - (HRESULT_FACILITY(hr) == FACILITY_WIN32)) - { - return HRESULT_CODE(hr); - } - return hr; -} - -FORCEINLINE -HRESULT -HRESULT_FROM_GETLASTERROR() -{ - return ( GetLastError() != NO_ERROR ) - ? HRESULT_FROM_WIN32( GetLastError() ) - : E_FAIL; -} +#include "stringu.h" extern PVOID g_pModuleId; extern BOOL g_fAspnetcoreRHAssemblyLoaded; diff --git a/src/AspNetCoreModuleV2/AspNetCore/Inc/proxymodule.h b/src/AspNetCoreModuleV2/AspNetCore/Inc/proxymodule.h index a5711f84c4..a0580b39b1 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/Inc/proxymodule.h +++ b/src/AspNetCoreModuleV2/AspNetCore/Inc/proxymodule.h @@ -3,8 +3,6 @@ #pragma once -#include "precomp.hxx" - #include "applicationinfo.h" #include "irequesthandler.h" diff --git a/src/AspNetCoreModuleV2/AspNetCore/src/applicationinfo.cpp b/src/AspNetCoreModuleV2/AspNetCore/src/applicationinfo.cpp index 0839090ed0..28c7c3636e 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/src/applicationinfo.cpp +++ b/src/AspNetCoreModuleV2/AspNetCore/src/applicationinfo.cpp @@ -7,6 +7,9 @@ #include "hostfxr_utility.h" #include "utility.h" #include "debugutil.h" +#include "resources.h" +#include "SRWExclusiveLock.h" +#include "GlobalVersionUtility.h" const PCWSTR APPLICATION_INFO::s_pwzAspnetcoreInProcessRequestHandlerName = L"aspnetcorev2_inprocess.dll"; const PCWSTR APPLICATION_INFO::s_pwzAspnetcoreOutOfProcessRequestHandlerName = L"aspnetcorev2_outofprocess.dll"; diff --git a/src/AspNetCoreModuleV2/AspNetCore/src/applicationmanager.cxx b/src/AspNetCoreModuleV2/AspNetCore/src/applicationmanager.cxx index ed3f1a67b0..45e0ae3b68 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/src/applicationmanager.cxx +++ b/src/AspNetCoreModuleV2/AspNetCore/src/applicationmanager.cxx @@ -1,10 +1,12 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include #include "applicationmanager.h" + #include "proxymodule.h" #include "utility.h" +#include "resources.h" +#include "SRWExclusiveLock.h" // The application manager is a singleton across ANCM. APPLICATION_MANAGER* APPLICATION_MANAGER::sm_pApplicationManager = NULL; diff --git a/src/AspNetCoreModuleV2/AspNetCore/src/aspnetcore_shim_config.cpp b/src/AspNetCoreModuleV2/AspNetCore/src/aspnetcore_shim_config.cpp index 108d5f4f6c..21c3bd997e 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/src/aspnetcore_shim_config.cpp +++ b/src/AspNetCoreModuleV2/AspNetCore/src/aspnetcore_shim_config.cpp @@ -5,7 +5,6 @@ #include "config_utility.h" #include "hostfxr_utility.h" -#include "debugutil.h" #include "ahutil.h" ASPNETCORE_SHIM_CONFIG::~ASPNETCORE_SHIM_CONFIG() diff --git a/src/AspNetCoreModuleV2/AspNetCore/src/dllmain.cpp b/src/AspNetCoreModuleV2/AspNetCore/src/dllmain.cpp index 373b835190..3f1ea78354 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/src/dllmain.cpp +++ b/src/AspNetCoreModuleV2/AspNetCore/src/dllmain.cpp @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "precomp.hxx" - #include "applicationinfo.h" #include "applicationmanager.h" #include "proxymodule.h" @@ -10,6 +8,8 @@ #include "acache.h" #include "utility.h" #include "debugutil.h" +#include "resources.h" +#include "exceptions.h" DECLARE_DEBUG_PRINT_OBJECT("aspnetcore.dll"); diff --git a/src/AspNetCoreModuleV2/AspNetCore/src/precomp.cpp b/src/AspNetCoreModuleV2/AspNetCore/src/precomp.cpp new file mode 100644 index 0000000000..12fcb1d436 --- /dev/null +++ b/src/AspNetCoreModuleV2/AspNetCore/src/precomp.cpp @@ -0,0 +1,4 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// Do not remove this file. It is used for precompiled header generation diff --git a/src/AspNetCoreModuleV2/AspNetCore/src/proxymodule.cxx b/src/AspNetCoreModuleV2/AspNetCore/src/proxymodule.cxx index 2dce65cf09..96372b48a1 100644 --- a/src/AspNetCoreModuleV2/AspNetCore/src/proxymodule.cxx +++ b/src/AspNetCoreModuleV2/AspNetCore/src/proxymodule.cxx @@ -7,7 +7,6 @@ #include "applicationinfo.h" #include "acache.h" #include "exceptions.h" - __override HRESULT ASPNET_CORE_PROXY_MODULE_FACTORY::GetHttpModule( diff --git a/src/AspNetCoreModuleV2/CommonLib/CommonLib.vcxproj b/src/AspNetCoreModuleV2/CommonLib/CommonLib.vcxproj index 3ce37711c7..2b6164989a 100644 --- a/src/AspNetCoreModuleV2/CommonLib/CommonLib.vcxproj +++ b/src/AspNetCoreModuleV2/CommonLib/CommonLib.vcxproj @@ -85,7 +85,7 @@ - NotUsing + Use Level4 true Disabled @@ -100,6 +100,7 @@ ..\iislib; true stdcpp17 + stdafx.h Windows @@ -108,7 +109,7 @@ - NotUsing + Use Level4 true Disabled @@ -124,6 +125,7 @@ ..\iislib; true stdcpp17 + stdafx.h Windows @@ -132,7 +134,7 @@ - NotUsing + Use Level4 true MaxSpeed @@ -148,6 +150,7 @@ ..\iislib; true stdcpp17 + stdafx.h Windows @@ -158,7 +161,7 @@ - NotUsing + Use Level4 true MaxSpeed @@ -176,6 +179,7 @@ MultiThreaded false stdcpp17 + stdafx.h Windows @@ -215,6 +219,12 @@ + + Create + Create + Create + Create + diff --git a/src/AspNetCoreModuleV2/CommonLib/EventLog.h b/src/AspNetCoreModuleV2/CommonLib/EventLog.h index 70bd1a1be6..8782eff6d4 100644 --- a/src/AspNetCoreModuleV2/CommonLib/EventLog.h +++ b/src/AspNetCoreModuleV2/CommonLib/EventLog.h @@ -3,4 +3,7 @@ #pragma once +#include "Utility.h" +#include "resources.h" + #define EVENTLOG(log, name, ...) UTILITY::LogEventF(log, ASPNETCORE_EVENT_ ## name ## _LEVEL, ASPNETCORE_EVENT_ ## name, ASPNETCORE_EVENT_ ## name ## _MSG, __VA_ARGS__) diff --git a/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp b/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp index a7bd703589..396a69ff31 100644 --- a/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.cpp @@ -1,7 +1,10 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#include "stdafx.h" +#include +#include + +#include "GlobalVersionUtility.h" namespace fs = std::experimental::filesystem; diff --git a/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.h b/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.h index 4a4e736eb7..7cd8420b5b 100644 --- a/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.h +++ b/src/AspNetCoreModuleV2/CommonLib/GlobalVersionUtility.h @@ -2,7 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once -#include + +#include "fx_ver.h" class GlobalVersionUtility { diff --git a/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.cpp b/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.cpp index ae492f005e..a7e1b53ee0 100644 --- a/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.cpp @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "stdafx.h" #include "SRWExclusiveLock.h" SRWExclusiveLock:: SRWExclusiveLock(const SRWLOCK& lock) diff --git a/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.h b/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.h index 15fcc1f673..7ff977f70d 100644 --- a/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.h +++ b/src/AspNetCoreModuleV2/CommonLib/SRWExclusiveLock.h @@ -3,6 +3,8 @@ #pragma once +#include + class SRWExclusiveLock { public: diff --git a/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.cpp b/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.cpp index 613e56984e..d561281385 100644 --- a/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.cpp @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "stdafx.h" #include "SRWSharedLock.h" SRWSharedLock:: SRWSharedLock(const SRWLOCK& lock) diff --git a/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.h b/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.h index b05b0090fb..7f1573e27e 100644 --- a/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.h +++ b/src/AspNetCoreModuleV2/CommonLib/SRWSharedLock.h @@ -3,6 +3,8 @@ #pragma once +#include + class SRWSharedLock { public: diff --git a/src/AspNetCoreModuleV2/CommonLib/application.h b/src/AspNetCoreModuleV2/CommonLib/application.h index 212fb27f63..0c0752f0c4 100644 --- a/src/AspNetCoreModuleV2/CommonLib/application.h +++ b/src/AspNetCoreModuleV2/CommonLib/application.h @@ -3,7 +3,8 @@ #pragma once -#include "stdafx.h" +#include "iapplication.h" +#include "ntassert.h" class APPLICATION : public IAPPLICATION { diff --git a/src/AspNetCoreModuleV2/CommonLib/config_utility.h b/src/AspNetCoreModuleV2/CommonLib/config_utility.h index 92320d97ed..a9e0259ea7 100644 --- a/src/AspNetCoreModuleV2/CommonLib/config_utility.h +++ b/src/AspNetCoreModuleV2/CommonLib/config_utility.h @@ -3,7 +3,9 @@ #pragma once -#include "stdafx.h" +#include +#include "ahutil.h" +#include "stringu.h" class ConfigUtility { diff --git a/src/AspNetCoreModuleV2/CommonLib/debugutil.cpp b/src/AspNetCoreModuleV2/CommonLib/debugutil.cpp index a0dfdbb00a..293bdfb4e8 100644 --- a/src/AspNetCoreModuleV2/CommonLib/debugutil.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/debugutil.cpp @@ -1,10 +1,12 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "stdafx.h" - #include "debugutil.h" + +#include #include "dbgutil.h" +#include "stringu.h" +#include "stringa.h" inline HANDLE g_hStandardOutput; diff --git a/src/AspNetCoreModuleV2/CommonLib/debugutil.h b/src/AspNetCoreModuleV2/CommonLib/debugutil.h index 54b0809221..5b81d0130b 100644 --- a/src/AspNetCoreModuleV2/CommonLib/debugutil.h +++ b/src/AspNetCoreModuleV2/CommonLib/debugutil.h @@ -4,6 +4,7 @@ #pragma once #include +#include "dbgutil.h" #define ASPNETCORE_DEBUG_FLAG_INFO DEBUG_FLAG_INFO #define ASPNETCORE_DEBUG_FLAG_WARNING DEBUG_FLAG_WARN diff --git a/src/AspNetCoreModuleV2/CommonLib/fx_ver.cxx b/src/AspNetCoreModuleV2/CommonLib/fx_ver.cxx index 7aeb0999c0..63183adf01 100644 --- a/src/AspNetCoreModuleV2/CommonLib/fx_ver.cxx +++ b/src/AspNetCoreModuleV2/CommonLib/fx_ver.cxx @@ -1,7 +1,11 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#include "stdafx.h" +#include "fx_ver.h" + +#include +#include +#include fx_ver_t::fx_ver_t(int major, int minor, int patch, const std::wstring& pre, const std::wstring& build) : m_major(major) @@ -189,4 +193,4 @@ bool fx_ver_t::parse(const std::wstring& ver, fx_ver_t* fx_ver, bool parse_only_ bool valid = parse_internal(ver, fx_ver, parse_only_production); assert(!valid || fx_ver->as_str() == ver); return valid; -} \ No newline at end of file +} diff --git a/src/AspNetCoreModuleV2/CommonLib/fx_ver.h b/src/AspNetCoreModuleV2/CommonLib/fx_ver.h index a8f8e26fff..2740fa37ee 100644 --- a/src/AspNetCoreModuleV2/CommonLib/fx_ver.h +++ b/src/AspNetCoreModuleV2/CommonLib/fx_ver.h @@ -3,6 +3,8 @@ #pragma once +#include + // Note: This is not SemVer (esp., in comparing pre-release part, fx_ver_t does not // compare multiple dot separated identifiers individually.) ex: 1.0.0-beta.2 vs. 1.0.0-beta.11 struct fx_ver_t @@ -22,8 +24,6 @@ struct fx_ver_t bool is_prerelease() const { return !m_pre.empty(); } std::wstring as_str() const; - std::wstring prerelease_glob() const; - std::wstring patch_glob() const; bool operator ==(const fx_ver_t& b) const; bool operator !=(const fx_ver_t& b) const; diff --git a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp index 5c7cc6f679..07854d97da 100644 --- a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.cpp @@ -1,8 +1,12 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "stdafx.h" +#include "hostfxr_utility.h" + #include +#include "EventLog.h" +#include "ntassert.h" +#include "fx_ver.h" namespace fs = std::experimental::filesystem; diff --git a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h index 5e35cc4a6d..b7dfcbf67c 100644 --- a/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h +++ b/src/AspNetCoreModuleV2/CommonLib/hostfxr_utility.h @@ -3,11 +3,11 @@ #pragma once -#include "precomp.h" - +#include #include #include #include +#include "stringu.h" typedef INT(*hostfxr_get_native_search_directories_fn) (CONST INT argc, CONST PCWSTR* argv, PWSTR buffer, DWORD buffer_size, DWORD* required_buffer_size); typedef INT(*hostfxr_main_fn) (CONST DWORD argc, CONST PCWSTR argv[]); diff --git a/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.cpp b/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.cpp index 69e60c8b90..a17258f5cf 100644 --- a/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.cpp +++ b/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.cpp @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "stdafx.h" +#include "hostfxroptions.h" + +#include "hostfxr_utility.h" HRESULT HOSTFXR_OPTIONS::Create( _In_ PCWSTR pcwzExeLocation, diff --git a/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.h b/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.h index 391e01291d..0529de4e62 100644 --- a/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.h +++ b/src/AspNetCoreModuleV2/CommonLib/hostfxroptions.h @@ -3,8 +3,11 @@ #pragma once +#include #include +#include "stringu.h" + class HOSTFXR_OPTIONS { public: diff --git a/src/AspNetCoreModuleV2/CommonLib/iapplication.h b/src/AspNetCoreModuleV2/CommonLib/iapplication.h index 36b2b40ddb..f8c67a6309 100644 --- a/src/AspNetCoreModuleV2/CommonLib/iapplication.h +++ b/src/AspNetCoreModuleV2/CommonLib/iapplication.h @@ -3,7 +3,7 @@ #pragma once -class IREQUEST_HANDLER; +#include "irequesthandler.h" enum APPLICATION_STATUS { diff --git a/src/AspNetCoreModuleV2/CommonLib/irequesthandler.h b/src/AspNetCoreModuleV2/CommonLib/irequesthandler.h index d3e5707063..b2be7ee401 100644 --- a/src/AspNetCoreModuleV2/CommonLib/irequesthandler.h +++ b/src/AspNetCoreModuleV2/CommonLib/irequesthandler.h @@ -3,6 +3,8 @@ #pragma once +#include + // // Pure abstract class // diff --git a/src/AspNetCoreModuleV2/CommonLib/requesthandler.h b/src/AspNetCoreModuleV2/CommonLib/requesthandler.h index ad12b90733..4553ee5c87 100644 --- a/src/AspNetCoreModuleV2/CommonLib/requesthandler.h +++ b/src/AspNetCoreModuleV2/CommonLib/requesthandler.h @@ -3,7 +3,8 @@ #pragma once -#include "stdafx.h" +#include "irequesthandler.h" +#include "ntassert.h" // // Pure abstract class diff --git a/src/AspNetCoreModuleV2/CommonLib/resources.h b/src/AspNetCoreModuleV2/CommonLib/resources.h index aaf4f1d50b..2d4ccee855 100644 --- a/src/AspNetCoreModuleV2/CommonLib/resources.h +++ b/src/AspNetCoreModuleV2/CommonLib/resources.h @@ -3,6 +3,8 @@ #pragma once +#include "aspnetcore_msg.h" + #define IDS_INVALID_PROPERTY 1000 #define IDS_SERVER_ERROR 1001 diff --git a/src/AspNetCoreModuleV2/CommonLib/stdafx.cpp b/src/AspNetCoreModuleV2/CommonLib/stdafx.cpp new file mode 100644 index 0000000000..12fcb1d436 --- /dev/null +++ b/src/AspNetCoreModuleV2/CommonLib/stdafx.cpp @@ -0,0 +1,4 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// Do not remove this file. It is used for precompiled header generation diff --git a/src/AspNetCoreModuleV2/CommonLib/stdafx.h b/src/AspNetCoreModuleV2/CommonLib/stdafx.h index 24e683b14e..d5407df316 100644 --- a/src/AspNetCoreModuleV2/CommonLib/stdafx.h +++ b/src/AspNetCoreModuleV2/CommonLib/stdafx.h @@ -9,35 +9,9 @@ #include #include -#include +#include #include #include #include #include #include - -#include "Shlwapi.h" -#include -#include "hashtable.h" -#include "stringu.h" -#include "stringa.h" -#include "multisz.h" -#include "dbgutil.h" -#include "ahutil.h" -#include "hashfn.h" -#include "sttimer.h" -#include "irequesthandler.h" -#include "sttimer.h" -#include "requesthandler.h" -#include "iapplication.h" -#include "application.h" -#include "SRWExclusiveLock.h" -#include "fx_ver.h" -#include "utility.h" -#include "GlobalVersionUtility.h" -#include "resources.h" -#include "aspnetcore_msg.h" -#include "hostfxr_utility.h" -#include "EventLog.h" -#include "hostfxroptions.h" -#include "exceptions.h" diff --git a/src/AspNetCoreModuleV2/CommonLib/sttimer.h b/src/AspNetCoreModuleV2/CommonLib/sttimer.h index ada44158a7..0ebbdbd822 100644 --- a/src/AspNetCoreModuleV2/CommonLib/sttimer.h +++ b/src/AspNetCoreModuleV2/CommonLib/sttimer.h @@ -3,7 +3,6 @@ #pragma once -#include "stdafx.h" #ifndef _STTIMER_H #define _STTIMER_H diff --git a/src/AspNetCoreModuleV2/CommonLib/utility.cxx b/src/AspNetCoreModuleV2/CommonLib/utility.cxx index a4d7ed46bd..b98cc24359 100644 --- a/src/AspNetCoreModuleV2/CommonLib/utility.cxx +++ b/src/AspNetCoreModuleV2/CommonLib/utility.cxx @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -#include "stdafx.h" +#include "utility.h" + +#include #include "debugutil.h" // static diff --git a/src/AspNetCoreModuleV2/CommonLib/utility.h b/src/AspNetCoreModuleV2/CommonLib/utility.h index f1f2c38afd..998d8fb3d6 100644 --- a/src/AspNetCoreModuleV2/CommonLib/utility.h +++ b/src/AspNetCoreModuleV2/CommonLib/utility.h @@ -5,6 +5,10 @@ #include "stdafx.h" +#include +#include "stringa.h" +#include "stringu.h" + class UTILITY { public: diff --git a/src/AspNetCoreModuleV2/IISLib/ahutil.h b/src/AspNetCoreModuleV2/IISLib/ahutil.h index 5694b21b7e..3632650aa4 100644 --- a/src/AspNetCoreModuleV2/IISLib/ahutil.h +++ b/src/AspNetCoreModuleV2/IISLib/ahutil.h @@ -255,4 +255,4 @@ FindNextLocationElement( HRESULT GetSharedConfigEnabled( BOOL * pfIsSharedConfig -); \ No newline at end of file +); diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/dllmain.cxx b/src/AspNetCoreModuleV2/InProcessRequestHandler/dllmain.cxx index 91d8dab0ef..2fba26d406 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/dllmain.cxx +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/dllmain.cxx @@ -8,9 +8,9 @@ #include #include "inprocessapplication.h" -#include "inprocesshandler.h" #include "requesthandler_config.h" #include "debugutil.h" +#include "resources.h" DECLARE_DEBUG_PRINT_OBJECT("aspnetcorev2_inprocess.dll"); diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp index 34359b1f2f..7ad1eb06f4 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.cpp @@ -7,6 +7,9 @@ #include "requesthandler_config.h" #include "environmentvariablehelpers.h" #include "aspnetcore_event.h" +#include "utility.h" +#include "EventLog.h" +#include "SRWExclusiveLock.h" IN_PROCESS_APPLICATION* IN_PROCESS_APPLICATION::s_Application = NULL; hostfxr_main_fn IN_PROCESS_APPLICATION::s_fMainCallback = NULL; diff --git a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h index 4641cd67b1..0bd0ecf4d7 100644 --- a/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h +++ b/src/AspNetCoreModuleV2/InProcessRequestHandler/inprocessapplication.h @@ -4,6 +4,7 @@ #pragma once #include "precomp.hxx" +#include "application.h" #include "inprocesshandler.h" #include "requesthandler_config.h" diff --git a/src/AspNetCoreModuleV2/RequestHandlerLib/FileOutputManager.cpp b/src/AspNetCoreModuleV2/RequestHandlerLib/FileOutputManager.cpp index 74c02a43cb..9aca9ae0c3 100644 --- a/src/AspNetCoreModuleV2/RequestHandlerLib/FileOutputManager.cpp +++ b/src/AspNetCoreModuleV2/RequestHandlerLib/FileOutputManager.cpp @@ -3,6 +3,7 @@ #include "stdafx.h" #include "sttimer.h" +#include "utility.h" FileOutputManager::FileOutputManager() { @@ -160,8 +161,8 @@ FileOutputManager::Start() // There are a few options for redirecting stdout/stderr, // but there are issues with most of them. - // AllocConsole() - // *stdout = *m_pStdFile; + // AllocConsole() + // *stdout = *m_pStdFile; // *stderr = *m_pStdFile; // Calling _dup2 on stderr fails on IIS. IIS sets stderr to -2 // _dup2(_fileno(m_pStdFile), _fileno(stdout));