Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. DisableThemes.cpp
  5. Abstract:
  6. This shim is for apps that don't support themes.
  7. Notes:
  8. This is a general purpose shim.
  9. History:
  10. 01/15/2001 clupu Created
  11. --*/
  12. #include "precomp.h"
  13. #include <stdio.h>
  14. IMPLEMENT_SHIM_BEGIN(FeedbackReport)
  15. #include "ShimHookMacro.h"
  16. APIHOOK_ENUM_BEGIN
  17. APIHOOK_ENUM_END
  18. void
  19. LaunchFeedbackUI(
  20. void
  21. )
  22. {
  23. STARTUPINFOW si;
  24. PROCESS_INFORMATION pi;
  25. WCHAR szCmdLine[MAX_PATH];
  26. WCHAR szExeName[MAX_PATH];
  27. ZeroMemory(&si, sizeof(si));
  28. ZeroMemory(&pi, sizeof(pi));
  29. si.cb = sizeof(si);
  30. GetModuleFileNameW(NULL, szExeName, MAX_PATH);
  31. swprintf(szCmdLine, L"ahui.exe feedback \"%s\"", szExeName);
  32. CreateProcessW(NULL,
  33. szCmdLine,
  34. NULL,
  35. NULL,
  36. FALSE,
  37. 0,
  38. NULL,
  39. NULL,
  40. &si,
  41. &pi);
  42. CloseHandle(pi.hProcess);
  43. CloseHandle(pi.hThread);
  44. }
  45. BOOL
  46. NOTIFY_FUNCTION(
  47. DWORD fdwReason
  48. )
  49. {
  50. if (fdwReason == SHIM_PROCESS_DYING) {
  51. LaunchFeedbackUI();
  52. }
  53. return TRUE;
  54. }
  55. /*++
  56. Register hooked functions
  57. --*/
  58. HOOK_BEGIN
  59. CALL_NOTIFY_FUNCTION
  60. HOOK_END
  61. IMPLEMENT_SHIM_END