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.

106 lines
1.7 KiB

  1. #include <windows.h>
  2. #include <port1632.h>
  3. #include <ddeml.h>
  4. #include "wrapper.h"
  5. #include "ddestrs.h"
  6. /* Truley global variables */
  7. CHAR szClass[] = "DdeStrs";
  8. int cyText = 0;
  9. int cxText = 0;
  10. BOOL fClient = FALSE;
  11. BOOL fServer = FALSE;
  12. HINSTANCE hInst;
  13. HWND hwndMain;
  14. CHAR szExecDie[] = "Die";
  15. CHAR szExecDisconnect[] = "Disconnect";
  16. CHAR szExecRefresh[] = "Refresh";
  17. // This array contains storage for each supported
  18. // format (CF_TEXT,CF_BITMAP,CF_DIB,..CF_ENHMETAFILE)
  19. INT iAvailFormats[] = { 0, 0, 0, 0, 0, 0 };
  20. /*
  21. * Service tables - read bottom up
  22. */
  23. DDEFORMATTBL TestItemFormats[] = {
  24. {
  25. "TEXT",
  26. CF_TEXT,
  27. 0,
  28. PokeTestItem_Text,
  29. RenderTestItem_Text
  30. },
  31. {
  32. "DIB",
  33. CF_DIB,
  34. 0,
  35. PokeTestItem_DIB,
  36. RenderTestItem_DIB
  37. },
  38. {
  39. "BITMAP",
  40. CF_BITMAP,
  41. 0,
  42. PokeTestItem_BITMAP,
  43. RenderTestItem_BITMAP
  44. },
  45. #ifdef WIN32
  46. {
  47. "ENHMETAFILE",
  48. CF_ENHMETAFILE,
  49. 0,
  50. PokeTestItem_ENHMETA,
  51. RenderTestItem_ENHMETA
  52. },
  53. #endif
  54. {
  55. "METAFILEPICT",
  56. CF_METAFILEPICT,
  57. 0,
  58. PokeTestItem_METAPICT,
  59. RenderTestItem_METAPICT
  60. },
  61. {
  62. "PALETTE",
  63. CF_PALETTE,
  64. 0,
  65. PokeTestItem_PALETTE,
  66. RenderTestItem_PALETTE
  67. }
  68. };
  69. DDEITEMTBL Items[] = {
  70. {
  71. "TestItem",
  72. 0,
  73. sizeof(TestItemFormats) / sizeof(DDEFORMATTBL),
  74. 0,
  75. TestItemFormats
  76. }
  77. };
  78. DDETOPICTBL Topics[] = {
  79. {
  80. TOPIC,
  81. 0,
  82. sizeof(Items) / sizeof(DDEITEMTBL),
  83. 0,
  84. Items,
  85. Execute
  86. }
  87. };
  88. DDESERVICETBL ServiceInfoTable[] = {
  89. {
  90. "DdeStrs",
  91. 0,
  92. sizeof(Topics) / sizeof(DDETOPICTBL),
  93. 0,
  94. Topics
  95. }
  96. };