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.

74 lines
2.3 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: usermode.c
  3. *
  4. * Client side stubs for any user-mode GDI-Plus thunks.
  5. *
  6. * Created: 2-May-1998
  7. * Author: J. Andrew Goossen [andrewgo]
  8. *
  9. * Copyright (c) 1998-1999 Microsoft Corporation
  10. \**************************************************************************/
  11. #include "precomp.h"
  12. #pragma hdrstop
  13. BOOLEAN GdiProcessSetup();
  14. BOOL InitializeGre();
  15. /******************************Public*Routine******************************\
  16. * GdiPlusDllInitialize
  17. *
  18. * DLL initialization routine to initialize GRE and CLIENT for user-mode
  19. * GDI+.
  20. *
  21. * 02-May-1998 -by- J. Andrew Goossen [andrewgo]
  22. * Wrote it.
  23. \**************************************************************************/
  24. BOOL
  25. GdiPlusDllInitialize(
  26. PVOID pvDllHandle,
  27. ULONG ulReason,
  28. PCONTEXT pcontext)
  29. {
  30. NTSTATUS status = 0;
  31. INT i;
  32. PTEB pteb = NtCurrentTeb();
  33. BOOLEAN bRet = TRUE;
  34. switch (ulReason)
  35. {
  36. case DLL_PROCESS_ATTACH:
  37. DisableThreadLibraryCalls(pvDllHandle);
  38. bRet = (InitializeGre() && GdiProcessSetup());
  39. ghbrDCBrush = GetStockObject (DC_BRUSH);
  40. ghbrDCPen = GetStockObject (DC_PEN);
  41. break;
  42. case DLL_PROCESS_DETACH:
  43. break;
  44. }
  45. return(bRet);
  46. }
  47. /******************************Public*Routine******************************\
  48. * NtUserSelectPalette
  49. *
  50. * Fake stub to allow user-mode GDI+ to link.
  51. *
  52. * 02-May-1998 -by- J. Andrew Goossen [andrewgo]
  53. * Wrote it.
  54. \**************************************************************************/
  55. HPALETTE
  56. NtUserSelectPalette(
  57. HDC hdc,
  58. HPALETTE hpalette,
  59. BOOL fForceBackground)
  60. {
  61. return(0);
  62. }