Skip to content

Commit

Permalink
17.7.24 Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tablacus committed Jul 24, 2017
1 parent 9195a36 commit b15a853
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion TE/Resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
#define STRING2(str) #str
#define VER_Y 17
#define VER_M 7
#define VER_D 20
#define VER_D 24
24 changes: 14 additions & 10 deletions TE/TE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ LPFNSHRunDialog lpfnSHRunDialog = NULL;
LPFNRegenerateUserEnvironment lpfnRegenerateUserEnvironment = NULL;
LPFNChangeWindowMessageFilterEx lpfnChangeWindowMessageFilterEx = NULL;
LPFNRtlGetVersion lpfnRtlGetVersion = NULL;
LPFNSetDefaultDllDirectories lpfnSetDefaultDllDirectories = NULL;
#ifdef _2000XP
LPFNSetDllDirectoryW lpfnSetDllDirectoryW = NULL;
LPFNIsWow64Process lpfnIsWow64Process = NULL;
Expand Down Expand Up @@ -9990,20 +9991,24 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
lpfnSHGetImageList = teSHGetImageList2000;
}
#endif
#ifdef _2000XP
tePathAppend(&bsLib, bsPath, L"kernel32.dll");
hDll = GetModuleHandle(bsLib);
SysFreeString(bsLib);
if (hDll) {
lpfnSetDefaultDllDirectories = (LPFNSetDefaultDllDirectories)GetProcAddress(hDll, "SetDefaultDllDirectories");
if (lpfnSetDefaultDllDirectories) {
lpfnSetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32 | LOAD_LIBRARY_SEARCH_USER_DIRS);
}
#ifdef _2000XP
lpfnSetDllDirectoryW = (LPFNSetDllDirectoryW)GetProcAddress(hDll, "SetDllDirectoryW");
if (lpfnSetDllDirectoryW) {
lpfnSetDllDirectoryW(L"");
}
lpfnIsWow64Process = (LPFNIsWow64Process)GetProcAddress(hDll, "IsWow64Process");
}
#else
SetDllDirectory(L"");
SetDllDirectory(L"");
#endif
}
#ifdef _2000XP
tePathAppend(&bsLib, bsPath, L"propsys.dll");
hDll = GetModuleHandle(bsLib);
Expand Down Expand Up @@ -13422,7 +13427,7 @@ STDMETHODIMP CteShellBrowser::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid
}
}
#ifdef _FIXWIN10IPBUG1
SetTimer(m_hwnd, 1, 500, teTimerProcFixWin10IPBug1);
SetTimer(m_hwnd, 2, 500, teTimerProcFixWin10IPBug1);
#endif
}
return S_OK;
Expand Down Expand Up @@ -13619,7 +13624,7 @@ STDMETHODIMP CteShellBrowser::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid
RedrawWindow(m_hwndDV, NULL, 0, RDW_NOERASE | RDW_INVALIDATE | RDW_ALLCHILDREN);
}
#ifdef _FIXWIN10IPBUG1
SetTimer(m_hwnd, 1, 64, teTimerProcFixWin10IPBug1);
SetTimer(m_hwnd, 2, 64, teTimerProcFixWin10IPBug1);
#endif
return S_OK;
case DISPID_VIEWMODECHANGED://XP+
Expand All @@ -13633,6 +13638,9 @@ STDMETHODIMP CteShellBrowser::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid
InitFolderSize();
return DoFunc(TE_OnColumnsChanged, this, S_OK);
case DISPID_ICONSIZECHANGED://XP-
#ifdef _FIXWIN10IPBUG1
FixWin10IPBug1();
#endif
return DoFunc(TE_OnIconSizeChanged, this, S_OK);
case DISPID_SORTDONE://XP-
#ifdef _FIXWIN10IPBUG1
Expand Down Expand Up @@ -14249,7 +14257,6 @@ VOID CteShellBrowser::OnNavigationComplete2()
SetFolderFlags(FALSE);
InitFolderSize();
if (m_pTC->m_bRedraw) {
KillTimer(g_hwndMain, TET_Redraw);
SetTimer(g_hwndMain, TET_Redraw, 24, teTimerProc);
}
}
Expand Down Expand Up @@ -14796,7 +14803,7 @@ void CteShellBrowser::Show(BOOL bShow, DWORD dwOptions)
if (m_hwndLV) {
ShowWindow(m_hwndLV, SW_SHOWNA);
#ifdef _FIXWIN10IPBUG1
SetTimer(m_hwnd, 1, 64, teTimerProcFixWin10IPBug1);
SetTimer(m_hwnd, 2, 64, teTimerProcFixWin10IPBug1);
#endif
}
SetRedraw(TRUE);
Expand Down Expand Up @@ -16136,7 +16143,6 @@ STDMETHODIMP CteWebBrowser::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid,
}
if (g_bInit) {
g_bInit = FALSE;
KillTimer(g_hwndMain, TET_Create);
SetTimer(g_hwndMain, TET_Create, 100, teTimerProc);
}
if (g_hwndMain != m_hwndParent) {
Expand Down Expand Up @@ -17197,15 +17203,13 @@ VOID CteTabCtrl::UnLockUpdate(BOOL bDirect)
RedrawUpdate();
return;
}
KillTimer(g_hwndMain, TET_Redraw);
SetTimer(g_hwndMain, TET_Redraw, 500, teTimerProc);
}

VOID CteTabCtrl::RedrawUpdate()
{
if (m_bRedraw) {
if (g_nLockUpdate) {
KillTimer(g_hwndMain, TET_Redraw);
SetTimer(g_hwndMain, TET_Redraw, 500, teTimerProc);
return;
}
Expand Down
11 changes: 11 additions & 0 deletions TE/TE.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ typedef BOOL (WINAPI* LPFNRemoveClipboardFormatListener)(__in HWND hwnd);
//7 or higher
typedef BOOL (WINAPI* LPFNChangeWindowMessageFilterEx)(__in HWND hwnd, __in UINT message, __in DWORD action, __inout_opt PCHANGEFILTERSTRUCT pChangeFilterStruct);

//8 or higher
typedef BOOL (WINAPI* LPFNSetDefaultDllDirectories)(__in DWORD DirectoryFlags);

//RTL
typedef NTSTATUS (WINAPI* LPFNRtlGetVersion)(PRTL_OSVERSIONINFOEXW lpVersionInformation);
//DLL
Expand All @@ -229,6 +232,14 @@ typedef HRESULT (STDAPICALLTYPE * LPFNDllCanUnloadNow)(void);
typedef LSTATUS (APIENTRY* LPFNRegQueryValueExW)(HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
#endif

#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32
#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800
#endif
#ifndef LOAD_LIBRARY_SEARCH_USER_DIRS
#define LOAD_LIBRARY_SEARCH_USER_DIRS 0x00000400
#endif


//Tablacus DLL Add-ons
typedef VOID (WINAPI * LPFNGetProcObjectW)(VARIANT *pVarResult);

Expand Down

0 comments on commit b15a853

Please sign in to comment.