mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-27 17:00:59 +01:00
Cleaned some unneeded stuff in the setup binary, and restored exported functions for launching/restarting Explorer
This commit is contained in:
parent
ac14c75e49
commit
98118101e6
@ -138,7 +138,8 @@ __declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, L
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*__declspec(dllexport)*/ int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
#ifndef EP_BUILD_SETUP
|
||||||
|
__declspec(dllexport) int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
TCHAR wszExplorerPath[MAX_PATH + 1];
|
TCHAR wszExplorerPath[MAX_PATH + 1];
|
||||||
@ -170,19 +171,20 @@ __declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, L
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*__declspec(dllexport)*/ int CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
__declspec(dllexport) int CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
Sleep(2000);
|
Sleep(2000);
|
||||||
ZZLaunchExplorer(hWnd, hInstance, lpszCmdLine, nCmdShow);
|
ZZLaunchExplorer(hWnd, hInstance, lpszCmdLine, nCmdShow);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*__declspec(dllexport)*/ int CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
__declspec(dllexport) int CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
BeginExplorerRestart(NULL);
|
BeginExplorerRestart(NULL);
|
||||||
FinishExplorerRestart();
|
FinishExplorerRestart();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize)
|
void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize)
|
||||||
{
|
{
|
||||||
@ -719,6 +721,7 @@ LSTATUS RegisterDWMService(DWORD dwDesiredState, DWORD dwOverride)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef EP_BUILD_SETUP
|
||||||
char* StrReplaceAllA(const char* s, const char* oldW, const char* newW, int* dwNewSize)
|
char* StrReplaceAllA(const char* s, const char* oldW, const char* newW, int* dwNewSize)
|
||||||
{
|
{
|
||||||
char* result;
|
char* result;
|
||||||
@ -1140,6 +1143,7 @@ HRESULT InputBox(BOOL bPassword, HWND hWnd, LPCWSTR wszPrompt, LPCWSTR wszTitle,
|
|||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
UINT PleaseWaitTimeout = 0;
|
UINT PleaseWaitTimeout = 0;
|
||||||
HHOOK PleaseWaitHook = NULL;
|
HHOOK PleaseWaitHook = NULL;
|
||||||
|
@ -131,11 +131,13 @@ __declspec(dllexport) int CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance,
|
|||||||
__declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
__declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*__declspec(dllexport)*/ int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
#ifndef EP_BUILD_SETUP
|
||||||
|
__declspec(dllexport) int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
||||||
|
|
||||||
/*__declspec(dllexport)*/ int CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
__declspec(dllexport) int CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
||||||
|
|
||||||
/*__declspec(dllexport)*/ int CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
__declspec(dllexport) int CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
|
||||||
#define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
|
#define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
|
||||||
|
@ -225,6 +225,11 @@
|
|||||||
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>EP_BUILD_SETUP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(WithEncryption)' == 'true'">
|
<ItemDefinitionGroup Condition="'$(WithEncryption)' == 'true'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>WITH_ENCRYPTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WITH_ENCRYPTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
Loading…
Reference in New Issue
Block a user