Skip to content

Commit 6d868db

Browse files
committed
24.9.20
1 parent 3c22903 commit 6d868db

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

tewv/Resource.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#define STRING(str) STRING2(str)
55
#define STRING2(str) #str
66
#define VER_Y 24
7-
#define VER_M 4
8-
#define VER_D 5
7+
#define VER_M 9
8+
#define VER_D 20
99
#define VER_Z 0

tewv/tewv.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,19 +1074,22 @@ STDMETHODIMP CteBase::DoVerb(LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSit
10741074
{
10751075
if (iVerb == OLEIVERB_INPLACEACTIVATE) {
10761076
m_hwndParent = hwndParent;
1077-
WCHAR pszDataPath[MAX_PATH], pszSetting[MAX_PATH + 64], pszProxyServer[MAX_PATH];
1078-
lstrcpy(pszSetting, L"--disable-web-security");
1077+
WCHAR pszDataPath[MAX_PATH], pszSetting[MAX_PATHEX + 64], pszProxyServer[MAX_PATHEX], pszProxyOverride[MAX_PATHEX];
1078+
lstrcpy(pszSetting, L"--allow-file-access-from-files --disable-gpu");
10791079
GetTempPath(MAX_PATH, pszDataPath);
10801080
PathAppend(pszDataPath, L"tablacus");
10811081
pszProxyServer[0] = NULL;
1082+
pszProxyOverride[0] = NULL;
10821083
HKEY hKey;
10831084
if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
10841085
DWORD dwSize = sizeof(DWORD);
10851086
DWORD dwProxyEnable = 0;
10861087
RegQueryValueEx(hKey, L"ProxyEnable", NULL, NULL, (LPBYTE)&dwProxyEnable, &dwSize);
1087-
if (dwProxyEnable) {
1088-
dwSize = MAX_PATH;
1088+
if (dwProxyEnable & 1) {
1089+
dwSize = MAX_PATHEX;
10891090
RegQueryValueEx(hKey, L"ProxyServer", NULL, NULL, (LPBYTE)&pszProxyServer, &dwSize);
1091+
dwSize = MAX_PATHEX;
1092+
RegQueryValueEx(hKey, L"ProxyOverride", NULL, NULL, (LPBYTE)&pszProxyOverride, &dwSize);
10901093
}
10911094
RegCloseKey(hKey);
10921095
}
@@ -1096,6 +1099,11 @@ STDMETHODIMP CteBase::DoVerb(LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSit
10961099
lstrcat(pszSetting, pszProxyServer);
10971100
lstrcat(pszSetting, L"\"");
10981101
}
1102+
if (pszProxyOverride[0]) {
1103+
lstrcat(pszSetting, L" --proxy-bypass-list=\"");
1104+
lstrcat(pszSetting, pszProxyOverride);
1105+
lstrcat(pszSetting, L"\"");
1106+
}
10991107
options->put_AdditionalBrowserArguments(pszSetting);
11001108
#ifdef _DEBUG
11011109
_CreateCoreWebView2EnvironmentWithOptions(NULL, pszDataPath, options.Get(), this);

0 commit comments

Comments
 (0)