Skip to content

Commit

Permalink
uxtheme go away come again another day
Browse files Browse the repository at this point in the history
  • Loading branch information
freedom7341 committed Jul 28, 2024
1 parent 6fed0a6 commit f257ef8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
23 changes: 22 additions & 1 deletion CscdSvc/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ __declspec(dllexport) BOOL CALLBACK InstallUserHook()
// Get our current directory and filename
GetModuleFileName(g_hModule, szFullPath, ARRAYSIZE(szFullPath));


// Fill out the ApiHookInfo structure
uah.m_size = sizeof(uah);
uah.m_funname1 = L"InitUserHook";
Expand Down Expand Up @@ -334,3 +333,25 @@ static BOOL WINAPI UnregisterUserApiHookRemote(VOID)

return TRUE;
}

/* * * *\
ExternUnregisterUserApiHookDelay -
Forward function
RETURNS -
TRUE if successful.
\* * * */
BOOL WINAPI ExternUnregisterUserApiHookDelay(VOID)
{
UnregisterUserApiHookDelay();
}

/* * * *\
ExternUnregisterUserApiHookRemote -
Forward function
RETURNS -
TRUE if successful.
\* * * */
BOOL WINAPI ExternUnregisterUserApiHookRemote(VOID)
{
return UnregisterUserApiHookRemote();
}
2 changes: 2 additions & 0 deletions CscdSvc/hook.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ __declspec(dllexport) BOOL CALLBACK RemoveUserHook(VOID);
BOOL WINAPI RegisterUserApiHookDelay(HINSTANCE hInstance, PUSERAPIHOOKINFO ApiHookInfo);
static BOOL WINAPI UnregisterUserApiHookDelay(VOID);
static BOOL WINAPI UnregisterUserApiHookRemote(VOID);
BOOL WINAPI ExternUnregisterUserApiHookDelay(VOID);
BOOL WINAPI ExternUnregisterUserApiHookRemote(VOID);
3 changes: 2 additions & 1 deletion CscdSvc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ VOID SvcInit(DWORD dwArgc, LPTSTR* lpszArgv)
// Report running status when initialization is complete.
ReportSvcStatus(SERVICE_RUNNING, NO_ERROR, 0);

// TO_DO: Perform work until service stops.
// Kill UxTheme for good
ExternUnregisterUserApiHookRemote();

// Install our user hook, if FALSE then fail.
if (!InstallUserHook())
Expand Down

0 comments on commit f257ef8

Please sign in to comment.