Leaked source code of windows server 2003
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.

92 lines
2.4 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. 01/29/2002 hioh Buffer overrun fix 518325
  14. --*/
  15. #include "precomp.h"
  16. IMPLEMENT_SHIM_BEGIN(TaskbarAndStartMenuProperty)
  17. #include "ShimHookMacro.h"
  18. //
  19. // No APIs
  20. //
  21. APIHOOK_ENUM_BEGIN
  22. APIHOOK_ENUM_END
  23. /*++
  24. Run Taskbar and Start Menu
  25. --*/
  26. BOOL
  27. NOTIFY_FUNCTION(
  28. DWORD fdwReason)
  29. {
  30. if (fdwReason == SHIM_STATIC_DLLS_INITIALIZED)
  31. {
  32. WCHAR szCommandLine[] = L"rundll32.exe shell32.dll,Options_RunDLL 1";
  33. WCHAR szCurrentDirectry[MAX_PATH];
  34. STARTUPINFO StartupInfo;
  35. PROCESS_INFORMATION ProcessInformation;
  36. GetCurrentDirectoryW(sizeof(szCurrentDirectry)/sizeof(szCurrentDirectry[0]), szCurrentDirectry);
  37. StartupInfo.cb = sizeof(STARTUPINFO);
  38. StartupInfo.lpReserved = NULL;
  39. StartupInfo.lpDesktop = NULL;
  40. StartupInfo.lpTitle = NULL;
  41. StartupInfo.dwFlags = 0;
  42. StartupInfo.cbReserved2 = 0;
  43. StartupInfo.lpReserved2 = NULL;
  44. CreateProcessW(
  45. NULL, // name of executable module
  46. szCommandLine, // command line string
  47. NULL, // SD
  48. NULL, // SD
  49. FALSE, // handle inheritance option
  50. CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT | CREATE_DEFAULT_ERROR_MODE,
  51. // creation flags
  52. NULL, // new environment block
  53. szCurrentDirectry, // current directory name
  54. &StartupInfo, // startup information
  55. &ProcessInformation // process information
  56. );
  57. }
  58. return TRUE;
  59. }
  60. /*++
  61. Register hooked functions
  62. --*/
  63. HOOK_BEGIN
  64. CALL_NOTIFY_FUNCTION
  65. HOOK_END
  66. IMPLEMENT_SHIM_END