Skip to content

Commit

Permalink
Added 64-bit build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Molanda committed Aug 22, 2024
1 parent 845cb84 commit 3c8247b
Show file tree
Hide file tree
Showing 7 changed files with 428 additions and 71 deletions.
2 changes: 1 addition & 1 deletion BrowserProxy/BrowserProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ HRESULT BrowserProxyModule::ForwardCookie(ICoreWebView2CookieManager *cookieMana

const WCHAR *value = nullptr;
{
DWORD skip = wcslen(name) + 1; // name=
DWORD skip = (DWORD)wcslen(name) + 1; // name=
if (size < skip)
return E_FAIL;

Expand Down
168 changes: 167 additions & 1 deletion BrowserProxy/BrowserProxy.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Develop|Win32">
<Configuration>Develop</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Develop|x64">
<Configuration>Develop</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
Expand All @@ -27,18 +39,36 @@
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand All @@ -47,31 +77,58 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Develop|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
<TargetName>BrowserProxy</TargetName>
<OutDir>$(SolutionDir)BrowserProxy\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
<TargetName>BrowserProxy</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<TargetName>BrowserProxy</TargetName>
<OutDir>$(SolutionDir)BrowserProxy\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)BrowserProxy\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<TargetName>BrowserProxy</TargetName>
<OutDir>$(SolutionDir)BrowserProxy\$(Configuration)\$(Platform)\</OutDir>
<IntDir>$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<TargetName>BrowserProxy</TargetName>
<OutDir>$(SolutionDir)BrowserProxy\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
<TargetName>BrowserProxy</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Expand Down Expand Up @@ -106,6 +163,38 @@
<AdditionalDependencies>version.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;THERE_LOGGING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<HeaderFileName>BrowserProxy_i.h</HeaderFileName>
<InterfaceIdentifierFileName>BrowserProxy_i.c</InterfaceIdentifierFileName>
<ProxyFileName>BrowserProxy_p.c</ProxyFileName>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)BrowserProxy.tlb</TypeLibraryName>
<DllDataFileName>
</DllDataFileName>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>.\BrowserProxy.def</ModuleDefinitionFile>
<AdditionalDependencies>version.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Expand Down Expand Up @@ -142,6 +231,40 @@
<AdditionalDependencies>version.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<HeaderFileName>BrowserProxy_i.h</HeaderFileName>
<InterfaceIdentifierFileName>BrowserProxy_i.c</InterfaceIdentifierFileName>
<ProxyFileName>BrowserProxy_p.c</ProxyFileName>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)BrowserProxy.tlb</TypeLibraryName>
<DllDataFileName>
</DllDataFileName>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>.\BrowserProxy.def</ModuleDefinitionFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>version.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
Expand Down Expand Up @@ -179,6 +302,40 @@
<AdditionalDependencies>version.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;THERE_LOGGING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<HeaderFileName>BrowserProxy_i.h</HeaderFileName>
<InterfaceIdentifierFileName>BrowserProxy_i.c</InterfaceIdentifierFileName>
<ProxyFileName>BrowserProxy_p.c</ProxyFileName>
<GenerateStublessProxies>true</GenerateStublessProxies>
<TypeLibraryName>$(IntDir)BrowserProxy.tlb</TypeLibraryName>
<DllDataFileName>
</DllDataFileName>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>.\BrowserProxy.def</ModuleDefinitionFile>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>version.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="platform.h" />
<ClInclude Include="resource.h" />
Expand All @@ -191,14 +348,23 @@
<ClCompile Include="BrowserProxy.cpp" />
<ClCompile Include="BrowserProxy_i.c">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">false</CompileAsManaged>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Develop|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="SettingsRequestHandler.cpp" />
<ClCompile Include="VoiceTrainerProxy.cpp" />
Expand Down
6 changes: 3 additions & 3 deletions BrowserProxy/SettingsRequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ HRESULT SettingsRequestHandler::HandleSettings(HWND wnd)
break;
}

DWORD size = token1 - data;
DWORD size = (DWORD)(token1 - data);
if (size > 0)
m_content->Write(data, size, nullptr);

Expand All @@ -192,7 +192,7 @@ HRESULT SettingsRequestHandler::HandleSettings(HWND wnd)
break;

data = token2 + 1;
size = token2 - token1 + 1;
size = (DWORD)(token2 - token1 + 1);
dsize -= size;

if (strncmp(token1, "@home@", size) == 0)
Expand Down Expand Up @@ -372,7 +372,7 @@ HRESULT SettingsRequestHandler::SettingsRequestHandler::SetStartPage(const WCHAR
HKEY key;
if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\There.com\\There", 0, KEY_WRITE, &key) == ERROR_SUCCESS)
{
DWORD length = (wcslen(url) + 1) * sizeof(WCHAR);
DWORD length = (DWORD)((wcslen(url) + 1) * sizeof(WCHAR));
result = RegSetKeyValue(key, L"Edge\\", L"Start Page", REG_SZ, (BYTE*)url, length);
RegCloseKey(key);
}
Expand Down
10 changes: 5 additions & 5 deletions FlashProxy/FlashProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ HRESULT STDMETHODCALLTYPE FlashProxyModule::Close(DWORD dwSaveOption)
BroadcastMessage(WM_FLASHPROXY_SET_TELEPORTING, 0, 0);

if (m_proxyWnd != nullptr)
SetWindowLongPtr(m_proxyWnd, GWL_USERDATA, 0);
SetWindowLongPtr(m_proxyWnd, GWLP_USERDATA, 0);

if (m_controller != nullptr)
m_controller->Close();
Expand Down Expand Up @@ -489,7 +489,7 @@ HRESULT STDMETHODCALLTYPE FlashProxyModule::DoVerb(LONG iVerb, LPMSG lpmsg, IOle
if (m_proxyWnd == nullptr)
return E_FAIL;

SetWindowLongPtr(m_proxyWnd, GWL_USERDATA, (LPARAM)this);
SetWindowLongPtr(m_proxyWnd, GWLP_USERDATA, (LPARAM)this);
}

{
Expand Down Expand Up @@ -1467,7 +1467,7 @@ LRESULT FlashProxyModule::BroadcastMessage(UINT Msg, WPARAM wParam, LPARAM lPara

LRESULT APIENTRY FlashProxyModule::ChildWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
FlashProxyModule *flashProxy = reinterpret_cast<FlashProxyModule*>(GetWindowLongPtr(hWnd, GWL_USERDATA));
FlashProxyModule *flashProxy = reinterpret_cast<FlashProxyModule*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));

switch (Msg)
{
Expand Down Expand Up @@ -1513,10 +1513,10 @@ LRESULT APIENTRY FlashProxyModule::ChildWndProc(HWND hWnd, UINT Msg, WPARAM wPar
{
WCHAR *buff = (WCHAR*)lParam;
if (wcscpy_s(buff, wParam / sizeof(WCHAR), flashProxy->m_aboutQuery) == 0)
length = wcslen(buff);
length = (LONG)wcslen(buff);
}
else
length = flashProxy->m_aboutQuery.Length();
length = (LONG)flashProxy->m_aboutQuery.Length();
}

return length;
Expand Down
Loading

0 comments on commit 3c8247b

Please sign in to comment.