Expose VirtualDirectory to In Process mode (#210)
This commit is contained in:
parent
332b108f41
commit
9c5d38a786
|
|
@ -139,6 +139,14 @@ public:
|
||||||
return &m_struApplicationFullPath;
|
return &m_struApplicationFullPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STRU*
|
||||||
|
QueryApplicationVirtualPath(
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return &m_struApplicationVirtualPath;
|
||||||
|
}
|
||||||
|
|
||||||
STRU*
|
STRU*
|
||||||
QueryProcessPath(
|
QueryProcessPath(
|
||||||
VOID
|
VOID
|
||||||
|
|
@ -233,6 +241,7 @@ private:
|
||||||
STRU m_struStdoutLogFile;
|
STRU m_struStdoutLogFile;
|
||||||
STRU m_struApplicationFullPath;
|
STRU m_struApplicationFullPath;
|
||||||
STRU m_strHostingModel;
|
STRU m_strHostingModel;
|
||||||
|
STRU m_struApplicationVirtualPath;
|
||||||
BOOL m_fStdoutLogEnabled;
|
BOOL m_fStdoutLogEnabled;
|
||||||
BOOL m_fForwardWindowsAuthToken;
|
BOOL m_fForwardWindowsAuthToken;
|
||||||
BOOL m_fDisableStartUpErrorPage;
|
BOOL m_fDisableStartUpErrorPage;
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,9 @@ ASPNETCORE_CONFIG::Populate(
|
||||||
ULONGLONG ullRawTimeSpan = 0;
|
ULONGLONG ullRawTimeSpan = 0;
|
||||||
ENUM_INDEX index;
|
ENUM_INDEX index;
|
||||||
ENVIRONMENT_VAR_ENTRY* pEntry = NULL;
|
ENVIRONMENT_VAR_ENTRY* pEntry = NULL;
|
||||||
|
DWORD dwCounter = 0;
|
||||||
|
DWORD dwPosition = 0;
|
||||||
|
WCHAR* pszPath = NULL;
|
||||||
|
|
||||||
m_pEnvironmentVariables = new ENVIRONMENT_VAR_HASH();
|
m_pEnvironmentVariables = new ENVIRONMENT_VAR_HASH();
|
||||||
if (m_pEnvironmentVariables == NULL)
|
if (m_pEnvironmentVariables == NULL)
|
||||||
|
|
@ -184,6 +187,33 @@ ASPNETCORE_CONFIG::Populate(
|
||||||
goto Finished;
|
goto Finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pszPath = strSiteConfigPath.QueryStr();
|
||||||
|
while (pszPath[dwPosition] != NULL)
|
||||||
|
{
|
||||||
|
if (pszPath[dwPosition] == '/')
|
||||||
|
{
|
||||||
|
dwCounter++;
|
||||||
|
if (dwCounter == 4)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
dwPosition++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dwCounter == 4)
|
||||||
|
{
|
||||||
|
hr = m_struApplicationVirtualPath.Copy(pszPath + dwPosition);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hr = m_struApplicationVirtualPath.Copy(L"/");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Will setup the application virtual path.
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
goto Finished;
|
||||||
|
}
|
||||||
|
|
||||||
hr = pAdminManager->GetAdminSection(CS_WINDOWS_AUTHENTICATION_SECTION,
|
hr = pAdminManager->GetAdminSection(CS_WINDOWS_AUTHENTICATION_SECTION,
|
||||||
strSiteConfigPath.QueryStr(),
|
strSiteConfigPath.QueryStr(),
|
||||||
&pWindowsAuthenticationElement);
|
&pWindowsAuthenticationElement);
|
||||||
|
|
|
||||||
|
|
@ -136,16 +136,22 @@ http_get_completion_info(
|
||||||
// the signature should be changed. application's based address should be passed in
|
// the signature should be changed. application's based address should be passed in
|
||||||
//
|
//
|
||||||
EXTERN_C __MIDL_DECLSPEC_DLLEXPORT
|
EXTERN_C __MIDL_DECLSPEC_DLLEXPORT
|
||||||
BSTR // TODO probably should make this a wide string
|
HRESULT // TODO probably should make this a wide string
|
||||||
http_get_application_full_path()
|
http_get_application_paths(
|
||||||
|
_Out_ BSTR* pwzFullPath,
|
||||||
|
_Out_ BSTR* pwzVirtualPath
|
||||||
|
)
|
||||||
{
|
{
|
||||||
LPWSTR pwzPath = NULL;
|
|
||||||
IN_PROCESS_APPLICATION* pApplication = IN_PROCESS_APPLICATION::GetInstance();
|
IN_PROCESS_APPLICATION* pApplication = IN_PROCESS_APPLICATION::GetInstance();
|
||||||
if (pApplication != NULL)
|
|
||||||
|
if (pApplication == NULL)
|
||||||
{
|
{
|
||||||
pwzPath = pApplication->QueryConfig()->QueryApplicationFullPath()->QueryStr();
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
return SysAllocString(pwzPath);
|
// These should be provided to the in process application as arguments?
|
||||||
|
*pwzFullPath = SysAllocString(pApplication->QueryConfig()->QueryApplicationFullPath()->QueryStr());
|
||||||
|
*pwzVirtualPath = SysAllocString(pApplication->QueryConfig()->QueryApplicationVirtualPath()->QueryStr());
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTERN_C __MIDL_DECLSPEC_DLLEXPORT
|
EXTERN_C __MIDL_DECLSPEC_DLLEXPORT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue