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.

82 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. IntelVideoPhone.cpp
  5. Abstract:
  6. Hooks all dialog procs and make the window handles on WM_COMMAND messages 16 bit.
  7. Notes:
  8. This is an app specific shim.
  9. History:
  10. 11/08/2000 linstev Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(IntelVideoPhone)
  14. #include "ShimHookMacro.h"
  15. APIHOOK_ENUM_BEGIN
  16. APIHOOK_ENUM_ENTRY(CreateDialogIndirectParamA)
  17. APIHOOK_ENUM_END
  18. INT_PTR CALLBACK
  19. DialogProcHook_IntelVideoPhone(
  20. DLGPROC pfnOld,
  21. HWND hwndDlg,
  22. UINT uMsg,
  23. WPARAM wParam,
  24. LPARAM lParam
  25. )
  26. {
  27. if (uMsg == WM_COMMAND) {
  28. lParam = 0;
  29. }
  30. return (*pfnOld)(hwndDlg, uMsg, wParam, lParam);
  31. }
  32. HWND
  33. APIHOOK(CreateDialogIndirectParamA)(
  34. HINSTANCE hInstance,
  35. LPCDLGTEMPLATE lpTemplate,
  36. HWND hWndParent,
  37. DLGPROC lpDialogFunc,
  38. LPARAM lParamInit
  39. )
  40. {
  41. lpDialogFunc = (DLGPROC) HookCallback(lpDialogFunc, DialogProcHook_IntelVideoPhone);
  42. return ORIGINAL_API(CreateDialogIndirectParamA)(
  43. hInstance,
  44. lpTemplate,
  45. hWndParent,
  46. lpDialogFunc,
  47. lParamInit);
  48. }
  49. /*++
  50. Register hooked functions
  51. --*/
  52. HOOK_BEGIN
  53. APIHOOK_ENTRY(USER32.DLL, CreateDialogIndirectParamA)
  54. HOOK_END
  55. IMPLEMENT_SHIM_END