Cleanup headers and enable MultiProcessorCompilation (#845)

This commit is contained in:
Pavel Krymets 2018-05-29 09:06:21 -07:00 committed by Justin Kotalik
parent 04656d9790
commit 2a467bfd6d
22 changed files with 802 additions and 643 deletions

View File

@ -82,7 +82,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ASPNETCOREMODULE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>precomp.hxx</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>..\IISLib;inc;..\CommonLib</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\IISLib;.\Inc;..\CommonLib</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
@ -96,12 +96,14 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;advapi32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ahadmin.lib;rpcrt4.lib;winhttp.lib;pdh.lib;ws2_32.lib;wbemuuid.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\Commonlib</AdditionalIncludeDirectories>
@ -115,7 +117,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ASPNETCOREMODULE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>precomp.hxx</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>..\IISLib;inc;..\CommonLib</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\IISLib;.\Inc;..\CommonLib</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
@ -128,6 +130,7 @@
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
@ -135,6 +138,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>kernel32.lib;user32.lib;advapi32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ahadmin.lib;rpcrt4.lib;winhttp.lib;pdh.lib;ws2_32.lib;wbemuuid.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\Commonlib</AdditionalIncludeDirectories>
@ -148,7 +152,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ASPNETCOREMODULE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\IISLib;inc;..\CommonLib</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\IISLib;.\Inc;..\CommonLib</AdditionalIncludeDirectories>
<PrecompiledHeaderFile>precomp.hxx</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
@ -162,6 +166,7 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -170,6 +175,7 @@
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;ahadmin.lib;winhttp.lib;odbc32.lib;ws2_32.lib;odbccp32.lib;wbemuuid.lib;iphlpapi.lib;pdh.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\Commonlib</AdditionalIncludeDirectories>
@ -184,7 +190,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ASPNETCOREMODULE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>precomp.hxx</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>..\IISLib;inc;..\CommonLib</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\IISLib;.\Inc;..\CommonLib</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
@ -197,6 +203,7 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -205,6 +212,7 @@
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>Source.def</ModuleDefinitionFile>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;ahadmin.lib;rpcrt4.lib;winhttp.lib;pdh.lib;ws2_32.lib;wbemuuid.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>..\Commonlib</AdditionalIncludeDirectories>
@ -218,7 +226,7 @@
<ClInclude Include="Inc\applicationmanager.h" />
<ClInclude Include="Inc\filewatcher.h" />
<ClInclude Include="Inc\proxymodule.h" />
<ClInclude Include="Src\precomp.hxx" />
<ClInclude Include="Inc\precomp.hxx" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Src\applicationinfo.cpp" />

View File

@ -3,9 +3,17 @@
#pragma once
#define API_BUFFER_TOO_SMALL 0x80008098
#include "precomp.hxx"
extern BOOL g_fRecycleProcessCalled;
#include "hostfxroptions.h"
#include "appoffline.h"
#include "filewatcher.h"
#include "hashtable.h"
#include "hashfn.h"
#include "aspnetcore_shim_config.h"
#include "iapplication.h"
#define API_BUFFER_TOO_SMALL 0x80008098
typedef
HRESULT
@ -16,6 +24,9 @@ HRESULT
_Out_ IAPPLICATION **pApplication
);
extern BOOL g_fRecycleProcessCalled;
extern PFN_ASPNETCORE_CREATE_APPLICATION g_pfnAspNetCoreCreateApplication;
//
// The key used for hash-table lookups, consists of the port on which the http process is created.
//
@ -168,6 +179,9 @@ private:
SRWLOCK m_srwLock;
IHttpServer *m_pServer;
PFN_ASPNETCORE_CREATE_APPLICATION m_pfnAspNetCoreCreateApplication;
static const PCWSTR s_pwzAspnetcoreInProcessRequestHandlerName;
static const PCWSTR s_pwzAspnetcoreOutOfProcessRequestHandlerName;
};
class APPLICATION_INFO_HASH :

View File

@ -3,6 +3,12 @@
#pragma once
#include "precomp.hxx"
#include "applicationinfo.h"
#include "multisz.h"
#include "filewatcher.h"
#define DEFAULT_HASH_BUCKETS 17
//

View File

@ -2,6 +2,9 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
#pragma once
#include "precomp.hxx"
class APP_OFFLINE_HTM
{
public:

View File

@ -2,6 +2,9 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
#pragma once
#include "precomp.hxx"
#define CS_ASPNETCORE_SECTION L"system.webServer/aspNetCore"
#define CS_ASPNETCORE_PROCESS_EXE_PATH L"processPath"
#define CS_ASPNETCORE_PROCESS_ARGUMENTS L"arguments"

View File

@ -3,6 +3,8 @@
#pragma once
#include "precomp.hxx"
#define FILE_WATCHER_SHUTDOWN_KEY (ULONG_PTR)(-1)
#define FILE_WATCHER_ENTRY_BUFFER_SIZE 4096
#ifndef CONTAINING_RECORD

View File

@ -3,6 +3,10 @@
#pragma once
#include "precomp.hxx"
#include "applicationmanager.h"
class ASPNET_CORE_GLOBAL_MODULE : public CGlobalModule
{

View File

@ -0,0 +1,66 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
#pragma once
#pragma warning( disable : 4091)
//
// System related headers
//
#define WIN32_LEAN_AND_MEAN
#define NTDDI_VERSION 0x06010000
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
#include <Windows.h>
#include <atlbase.h>
#include <httpserv.h>
#include "stringu.h"
#include "stringa.h"
#include "ntassert.h"
#include "dbgutil.h"
#include "aspnetcore_msg.h"
#include "resources.h"
#include <memory>
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;
}
extern PVOID g_pModuleId;
extern BOOL g_fAspnetcoreRHAssemblyLoaded;
extern BOOL g_fAspnetcoreRHLoadedError;
extern BOOL g_fInShutdown;
extern BOOL g_fEnableReferenceCountTracing;
extern DWORD g_dwActiveServerProcesses;
extern HINSTANCE g_hModule;
extern HMODULE g_hAspnetCoreRH;
extern SRWLOCK g_srwLock;
extern PCWSTR g_pwzAspnetcoreRequestHandlerName;
extern HANDLE g_hEventLog;
#pragma warning( error : 4091)

View File

@ -3,6 +3,11 @@
#pragma once
#include "precomp.hxx"
#include "applicationinfo.h"
#include "irequesthandler.h"
extern HTTP_MODULE_ID g_pModuleId;
extern IHttpServer *g_pHttpServer;
extern HMODULE g_hAspnetCoreRH;

View File

@ -1,7 +1,14 @@
// 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 "proxymodule.h"
#include "hostfxr_utility.h"
#include "utility.h"
const PCWSTR APPLICATION_INFO::s_pwzAspnetcoreInProcessRequestHandlerName = L"aspnetcorev2_inprocess.dll";
const PCWSTR APPLICATION_INFO::s_pwzAspnetcoreOutOfProcessRequestHandlerName = L"aspnetcorev2_outofprocess.dll";
APPLICATION_INFO::~APPLICATION_INFO()
{
@ -258,11 +265,11 @@ APPLICATION_INFO::FindRequestHandlerAssembly(STRU& location)
if (m_pConfiguration->QueryHostingModel() == APP_HOSTING_MODEL::HOSTING_IN_PROCESS)
{
pstrHandlerDllName = g_pwzAspnetcoreInProcessRequestHandlerName;
pstrHandlerDllName = s_pwzAspnetcoreInProcessRequestHandlerName;
}
else
{
pstrHandlerDllName = g_pwzAspnetcoreOutOfProcessRequestHandlerName;
pstrHandlerDllName = s_pwzAspnetcoreOutOfProcessRequestHandlerName;
}
// Try to see if RH is already loaded

View File

@ -1,7 +1,11 @@
// 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 "applicationmanager.h"
#include "proxymodule.h"
#include "utility.h"
#include <memory>
// The application manager is a singleton across ANCM.
APPLICATION_MANAGER* APPLICATION_MANAGER::sm_pApplicationManager = NULL;

View File

@ -1,7 +1,11 @@
// 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 "aspnetcore_shim_config.h"
#include "hostfxr_utility.h"
#include "debugutil.h"
#include "ahutil.h"
ASPNETCORE_SHIM_CONFIG::~ASPNETCORE_SHIM_CONFIG()
{

View File

@ -2,7 +2,13 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
#include "precomp.hxx"
#include <IPHlpApi.h>
#include "applicationinfo.h"
#include "applicationmanager.h"
#include "proxymodule.h"
#include "globalmodule.h"
#include "acache.h"
#include "utility.h"
HTTP_MODULE_ID g_pModuleId = NULL;
IHttpServer * g_pHttpServer = NULL;
@ -19,8 +25,6 @@ DWORD g_dwActiveServerProcesses = 0;
SRWLOCK g_srwLock;
DWORD g_dwDebugFlags = 0;
PCSTR g_szDebugLabel = "ASPNET_CORE_MODULE";
PCWSTR g_pwzAspnetcoreInProcessRequestHandlerName = L"aspnetcorev2_inprocess.dll";
PCWSTR g_pwzAspnetcoreOutOfProcessRequestHandlerName = L"aspnetcorev2_outofprocess.dll";
PFN_ASPNETCORE_CREATE_APPLICATION g_pfnAspNetCoreCreateApplication;
VOID

View File

@ -1,7 +1,10 @@
// 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 "filewatcher.h"
#include "ntassert.h"
#include "applicationinfo.h"
FILE_WATCHER::FILE_WATCHER() :
m_hCompletionPort(NULL),

View File

@ -1,4 +1,7 @@
#include "precomp.hxx"
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
#include "globalmodule.h"
ASPNET_CORE_GLOBAL_MODULE::ASPNET_CORE_GLOBAL_MODULE(
APPLICATION_MANAGER* pApplicationManager)

View File

@ -1,160 +1,160 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// // Copyright (c) .NET Foundation. All rights reserved.
// // Licensed under the MIT License. See License.txt in the project root for license information.
#pragma once
#pragma warning( disable : 4091)
// #pragma once
// #pragma warning( disable : 4091)
//
// System related headers
//
#define _WINSOCKAPI_
// //
// // System related headers
// //
// #define _WINSOCKAPI_
#define NTDDI_VERSION 0x06010000
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
// #define NTDDI_VERSION 0x06010000
// #define WINVER 0x0601
// #define _WIN32_WINNT 0x0601
#include <windows.h>
#include <atlbase.h>
#include <pdh.h>
// #include <windows.h>
// #include <atlbase.h>
// #include <pdh.h>
//#include <ntassert.h>
#include <Shlobj.h>
#include <httpserv.h>
// //#include <ntassert.h>
// #include <Shlobj.h>
// #include <httpserv.h>
// This should remove our issue of compiling for win7 without header files.
// We force the Windows 8 version check logic in iiswebsocket.h to succeed even though we're compiling for Windows 7.
// Then, we set the version defines back to Windows 7 to for the remainder of the compilation.
#undef NTDDI_VERSION
#undef WINVER
#undef _WIN32_WINNT
#define NTDDI_VERSION 0x06020000
#define WINVER 0x0602
#define _WIN32_WINNT 0x0602
#include <iiswebsocket.h>
#undef NTDDI_VERSION
#undef WINVER
#undef _WIN32_WINNT
// // This should remove our issue of compiling for win7 without header files.
// // We force the Windows 8 version check logic in iiswebsocket.h to succeed even though we're compiling for Windows 7.
// // Then, we set the version defines back to Windows 7 to for the remainder of the compilation.
// #undef NTDDI_VERSION
// #undef WINVER
// #undef _WIN32_WINNT
// #define NTDDI_VERSION 0x06020000
// #define WINVER 0x0602
// #define _WIN32_WINNT 0x0602
// #include <iiswebsocket.h>
// #undef NTDDI_VERSION
// #undef WINVER
// #undef _WIN32_WINNT
#define NTDDI_VERSION 0x06010000
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
// #define NTDDI_VERSION 0x06010000
// #define WINVER 0x0601
// #define _WIN32_WINNT 0x0601
#include <httptrace.h>
#include <winhttp.h>
// #include <httptrace.h>
// #include <winhttp.h>
#include <cstdlib>
#include <vector>
#include <wchar.h>
// #include <cstdlib>
// #include <vector>
// #include <wchar.h>
//
// Option available starting Windows 8.
// 111 is the value in SDK on May 15, 2012.
//
#ifndef WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS
#define WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS 111
#endif
// //
// // Option available starting Windows 8.
// // 111 is the value in SDK on May 15, 2012.
// //
// #ifndef WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS
// #define WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS 111
// #endif
#ifdef max
#undef max
template<typename T> inline T max(T a, T b)
{
return a > b ? a : b;
}
#endif
// #ifdef max
// #undef max
// template<typename T> inline T max(T a, T b)
// {
// return a > b ? a : b;
// }
// #endif
#ifdef min
#undef min
template<typename T> inline T min(T a, T b)
{
return a < b ? a : b;
}
#endif
// #ifdef min
// #undef min
// template<typename T> inline T min(T a, T b)
// {
// return a < b ? a : b;
// }
// #endif
inline bool IsSpace(char ch)
{
switch(ch)
{
case 32: // ' '
case 9: // '\t'
case 10: // '\n'
case 13: // '\r'
case 11: // '\v'
case 12: // '\f'
return true;
default:
return false;
}
}
// inline bool IsSpace(char ch)
// {
// switch(ch)
// {
// case 32: // ' '
// case 9: // '\t'
// case 10: // '\n'
// case 13: // '\r'
// case 11: // '\v'
// case 12: // '\f'
// return true;
// default:
// return false;
// }
// }
#include <hashfn.h>
#include <hashtable.h>
#include "stringa.h"
#include "stringu.h"
#include "dbgutil.h"
#include "ahutil.h"
#include "multisz.h"
#include "multisza.h"
#include "base64.h"
#include <listentry.h>
#include <datetime.h>
#include <reftrace.h>
#include <acache.h>
#include <time.h>
// #include <hashfn.h>
// #include <hashtable.h>
// #include "stringa.h"
// #include "stringu.h"
// #include "dbgutil.h"
// #include "ahutil.h"
// #include "multisz.h"
// #include "multisza.h"
// #include "base64.h"
// #include <listentry.h>
// #include <datetime.h>
// #include <reftrace.h>
// #include <acache.h>
// #include <time.h>
#include "environmentvariablehash.h"
#include "hostfxr_utility.h"
#include "utility.h"
#include "debugutil.h"
#include "requesthandler.h"
#include "resources.h"
#include "aspnetcore_msg.h"
//#include "aspnetcore_event.h"
#include "aspnetcore_shim_config.h"
#include "fx_ver.h"
// #include "environmentvariablehash.h"
// #include "hostfxr_utility.h"
// #include "utility.h"
// #include "debugutil.h"
// #include "requesthandler.h"
// #include "resources.h"
// #include "aspnetcore_msg.h"
// //#include "aspnetcore_event.h"
// #include "aspnetcore_shim_config.h"
// #include "fx_ver.h"
#include "appoffline.h"
#include "filewatcher.h"
#include "applicationinfo.h"
#include "applicationmanager.h"
#include "globalmodule.h"
#include "proxymodule.h"
#include "applicationinfo.h"
#include "hostfxroptions.h"
// #include "appoffline.h"
// #include "filewatcher.h"
// #include "applicationinfo.h"
// #include "applicationmanager.h"
// #include "globalmodule.h"
// #include "proxymodule.h"
// #include "applicationinfo.h"
// #include "hostfxroptions.h"
FORCEINLINE
DWORD
WIN32_FROM_HRESULT(
HRESULT hr
)
{
if ((FAILED(hr)) &&
(HRESULT_FACILITY(hr) == FACILITY_WIN32))
{
return HRESULT_CODE(hr);
}
return hr;
}
// 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;
}
// FORCEINLINE
// HRESULT
// HRESULT_FROM_GETLASTERROR()
// {
// return ( GetLastError() != NO_ERROR )
// ? HRESULT_FROM_WIN32( GetLastError() )
// : E_FAIL;
// }
extern PVOID g_pModuleId;
extern BOOL g_fAspnetcoreRHAssemblyLoaded;
extern BOOL g_fAspnetcoreRHLoadedError;
extern BOOL g_fInShutdown;
extern BOOL g_fEnableReferenceCountTracing;
extern DWORD g_dwActiveServerProcesses;
extern HINSTANCE g_hModule;
extern HMODULE g_hAspnetCoreRH;
extern SRWLOCK g_srwLock;
extern HANDLE g_hEventLog;
extern PCWSTR g_pwzAspnetcoreInProcessRequestHandlerName;
extern PCWSTR g_pwzAspnetcoreOutOfProcessRequestHandlerName;
extern PFN_ASPNETCORE_CREATE_APPLICATION g_pfnAspNetCoreCreateApplication;
#pragma warning( error : 4091)
// extern PVOID g_pModuleId;
// extern BOOL g_fAspnetcoreRHAssemblyLoaded;
// extern BOOL g_fAspnetcoreRHLoadedError;
// extern BOOL g_fInShutdown;
// extern BOOL g_fEnableReferenceCountTracing;
// extern DWORD g_dwActiveServerProcesses;
// extern HINSTANCE g_hModule;
// extern HMODULE g_hAspnetCoreRH;
// extern SRWLOCK g_srwLock;
// extern HANDLE g_hEventLog;
// extern PCWSTR g_pwzAspnetcoreInProcessRequestHandlerName;
// extern PCWSTR g_pwzAspnetcoreOutOfProcessRequestHandlerName;
// extern PFN_ASPNETCORE_CREATE_APPLICATION g_pfnAspNetCoreCreateApplication;
// #pragma warning( error : 4091)

View File

@ -1,9 +1,14 @@
// 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 "proxymodule.h"
#include "applicationmanager.h"
#include "applicationinfo.h"
#include "acache.h"
#include "hostfxroptions.h"
__override
HRESULT
ASPNET_CORE_PROXY_MODULE_FACTORY::GetHttpModule(
@ -81,7 +86,7 @@ ASPNET_CORE_PROXY_MODULE::OnExecuteRequestHandler(
APPLICATION_MANAGER *pApplicationManager = NULL;
REQUEST_NOTIFICATION_STATUS retVal = RQ_NOTIFICATION_CONTINUE;
IAPPLICATION* pApplication = NULL;
STACK_STRU(struFileName, 256);
STRU struExeLocation;
if (g_fInShutdown)
{

View File

@ -96,6 +96,7 @@
<ShowIncludes>false</ShowIncludes>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>..\iislib;</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -116,6 +117,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<AdditionalIncludeDirectories>..\iislib;</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -136,6 +138,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<AdditionalIncludeDirectories>..\iislib;</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -160,6 +163,7 @@
</AdditionalUsingDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -202,6 +206,11 @@
</ClCompile>
<ClCompile Include="utility.cxx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IISLib\IISLib.vcxproj">
<Project>{4787a64f-9a3e-4867-a55a-70cb4b2b2ffe}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="aspnetcore_msg.mc">
<FileType>Document</FileType>
@ -219,11 +228,6 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).rc;%(Filename).h;MSG0409.bin</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IISLib\IISLib.vcxproj">
<Project>{09d9d1d6-2951-4e14-bc35-76a23cf9391a}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -3,6 +3,10 @@
#pragma once
#include "precomp.h"
#include <vector>
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[]);

View File

@ -3,6 +3,8 @@
#pragma once
#include <memory>
class HOSTFXR_OPTIONS
{
public:

View File

@ -92,6 +92,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -110,6 +111,7 @@
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -129,6 +131,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -150,6 +153,7 @@
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ShowIncludes>false</ShowIncludes>
<TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -103,6 +103,7 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -133,6 +134,7 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -163,6 +165,7 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -195,6 +198,7 @@
<OmitDefaultLibName>true</OmitDefaultLibName>
<CompileAs>CompileAsCpp</CompileAs>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>