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.

91 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2000-2001 Microsoft Corporation
  3. Module Name:
  4. TaskbarAndStartMenuProperty.cpp
  5. Abstract:
  6. Show Taskbar and Start Menu Properties dialog.
  7. This is originally for Hebrew App "Itzrubal Pro" that uses full screen and hide taskbar.
  8. The App launch always causes Taskbar and Start Menu Properties dialog pop up.
  9. When the dialog pop up on top of App during app loading, the App causes hung up.
  10. If the dialog exist prior to App launch, the dialog lose focus and App loaded successfully.
  11. History:
  12. 07/13/2001 hioh Created
  13. --*/
  14. #include "precomp.h"
  15. IMPLEMENT_SHIM_BEGIN(TaskbarAndStartMenuProperty)
  16. #include "ShimHookMacro.h"
  17. //
  18. // No APIs
  19. //
  20. APIHOOK_ENUM_BEGIN
  21. APIHOOK_ENUM_END
  22. /*++
  23. Run Taskbar and Start Menu
  24. --*/
  25. BOOL
  26. NOTIFY_FUNCTION(
  27. DWORD fdwReason)
  28. {
  29. if (fdwReason == SHIM_STATIC_DLLS_INITIALIZED)
  30. {
  31. WCHAR szCommandLine[] = L"rundll32.exe shell32.dll,Options_RunDLL 1";
  32. WCHAR szCurrentDirectry[MAX_PATH];
  33. STARTUPINFO StartupInfo;
  34. PROCESS_INFORMATION ProcessInformation;
  35. GetCurrentDirectory(sizeof(szCurrentDirectry), szCurrentDirectry);
  36. StartupInfo.cb = sizeof(STARTUPINFO);
  37. StartupInfo.lpReserved = NULL;
  38. StartupInfo.lpDesktop = NULL;
  39. StartupInfo.lpTitle = NULL;
  40. StartupInfo.dwFlags = 0;
  41. StartupInfo.cbReserved2 = 0;
  42. StartupInfo.lpReserved2 = NULL;
  43. CreateProcess(
  44. NULL, // name of executable module
  45. szCommandLine, // command line string
  46. NULL, // SD
  47. NULL, // SD
  48. FALSE, // handle inheritance option
  49. CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT | CREATE_DEFAULT_ERROR_MODE,
  50. // creation flags
  51. NULL, // new environment block
  52. szCurrentDirectry, // current directory name
  53. &StartupInfo, // startup information
  54. &ProcessInformation // process information
  55. );
  56. }
  57. return TRUE;
  58. }
  59. /*++
  60. Register hooked functions
  61. --*/
  62. HOOK_BEGIN
  63. CALL_NOTIFY_FUNCTION
  64. HOOK_END
  65. IMPLEMENT_SHIM_END