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.

109 lines
2.2 KiB

  1. //____________________________________________________________________________
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1995.
  5. //
  6. // File: dllutil.cxx
  7. //
  8. // Contents: DLL related stuff
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 1/4/1996 RaviR Created
  15. //
  16. //____________________________________________________________________________
  17. #include "..\pch\headers.hxx"
  18. #pragma hdrstop
  19. #include <locale.h>
  20. #include "dbg.h"
  21. #include "macros.h"
  22. #include "common.hxx"
  23. //
  24. // Debug stuff
  25. //
  26. DECLARE_INFOLEVEL(Job);
  27. DECLARE_HEAPCHECKING;
  28. //
  29. // Clipboard formats
  30. //
  31. #define CFSTR_JOBIDLIST TEXT("Job IDList Array")
  32. #define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
  33. extern "C" UINT g_cfJobIDList = 0;
  34. extern "C" UINT g_cfShellIDList = 0;
  35. extern "C" UINT g_cfPreferredDropEffect = 0;
  36. #if (DBG == 1)
  37. extern BOOL fInfoLevelInit;
  38. #endif // (DBG == 1)
  39. BOOL
  40. JFOnProcessAttach(void)
  41. {
  42. //
  43. // Init debugging stuff.
  44. //
  45. #if DBG == 1
  46. {
  47. InitializeDebugging();
  48. JobInfoLevel = DEB_ERROR | DEB_WARN;
  49. fInfoLevelInit = FALSE;
  50. CheckInit(JobInfoLevelString, &JobInfoLevel);
  51. //SetSmAssertLevel(ASSRT_BREAK | ASSRT_MESSAGE);
  52. SetSmAssertLevel(ASSRT_POPUP | ASSRT_MESSAGE);
  53. }
  54. #endif // DBG == 1
  55. TRACE_FUNCTION(JFOnProcessAttach);
  56. //
  57. // Get the clipboard formats used by the data object.
  58. //
  59. g_cfJobIDList = RegisterClipboardFormat(CFSTR_JOBIDLIST);
  60. g_cfShellIDList = RegisterClipboardFormat(CFSTR_SHELLIDLIST);
  61. g_cfPreferredDropEffect = RegisterClipboardFormat(
  62. CFSTR_PREFERREDDROPEFFECT);
  63. if ((g_cfJobIDList == 0) ||
  64. (g_cfShellIDList == 0) ||
  65. (g_cfPreferredDropEffect == 0))
  66. {
  67. DEBUG_OUT_LASTERROR;
  68. return FALSE;
  69. }
  70. //
  71. // Get common controls
  72. //
  73. InitCommonControls();
  74. INITCOMMONCONTROLSEX icce;
  75. icce.dwSize = sizeof(icce);
  76. icce.dwICC = ICC_DATE_CLASSES;
  77. InitCommonControlsEx(&icce);
  78. //
  79. // Set the C runtime library locale, for string operations
  80. //
  81. setlocale(LC_CTYPE, "");
  82. return TRUE;
  83. }