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.

213 lines
5.8 KiB

  1. //LUIENG.DLL
  2. //Created by Chad Mumford
  3. //2/5/96
  4. #include <windows.h>
  5. //********************************************************************************
  6. //** Declarations
  7. //********************************************************************************
  8. #define MODULEAPI __declspec(dllexport)
  9. #define INAPI __declspec(dllimport)
  10. #ifndef LUIENG
  11. #define LUIENG
  12. enum LOGLEVEL{LHEADING,L1,L2,L3,L4,LPASS1,LPASS2,LPASS3,LPASS4,
  13. LFAIL1,LFAIL2,LFAIL3,LFAIL4,LPASS,LFAIL};
  14. enum SUMLEVEL{SL1,SL2,SL3,SL4,SLALL}; //LALL only works with
  15. //LUISummaryOut & LUIClearSummary
  16. enum MENUTYPE{NORMAL,LINE,STARTSUBMENU,ENDSUBMENU,ENDMENU};
  17. /*e.g.
  18. Tests
  19. itm1 -NORMAL
  20. ---- -LINE
  21. itm2 -NORMAL
  22. submenu1 -STARTSUBMENU
  23. itm1 -NORMAL
  24. itm2 -NORMAL
  25. itm3 -NORMAL
  26. itm4 -NORMAL
  27. submenu2 -STARTSUBMENU
  28. itm1 -NORMAL
  29. -ENDSUBMENU
  30. -ENDSUBMENU
  31. itm3 -NORMAL
  32. -ENDMENU
  33. */
  34. struct MenuStruct
  35. {
  36. char lpszItemName[20];
  37. UINT nItemID;
  38. MENUTYPE nType;
  39. };
  40. #define IDM_FILEOPEN 1
  41. #define IDM_FILECLOSE 2
  42. #define IDM_FILESAVE 3
  43. #define IDM_FILEPRINT 4
  44. #define IDM_CLOSE 5
  45. #define IDM_RUN 6
  46. #define IDM_STOP 7
  47. #define IDM_PAUSE 8
  48. #define IDM_EDIT_COPY 9
  49. #define IDM_EDIT_CLEAR 10 //implemented by dll
  50. #define IDM_EDIT_SETTINGS 12
  51. #define IDM_FILEEXIT 11 //implemented by dll
  52. #define IDM_ABOUT 13
  53. #define IDM_CONTENTS 14
  54. // exported functions
  55. extern "C"{
  56. typedef INAPI BOOL (*LUIINIT)(HWND,MenuStruct *, MenuStruct *, BOOL);
  57. typedef INAPI BOOL (*LUIMSGHANDLER)(UINT message, UINT wParam, LONG lParam);
  58. typedef INAPI void (*LUIOUT)(LOGLEVEL Level, LPSTR lpszString,...);
  59. typedef INAPI void (*LUISETSUMMARY)(SUMLEVEL level, UINT nPassed, UINT nFailed);
  60. typedef INAPI void (*LUIGETSUMMARY)(SUMLEVEL level, UINT *nPassed, UINT *nFailed);
  61. typedef INAPI void (*LUICLEARSUMMARY)(SUMLEVEL level);
  62. typedef INAPI void (*LUISUMMARYOUT)(SUMLEVEL level);
  63. }
  64. #endif
  65. //*******************************************************
  66. //* Function Descriptions
  67. //********************************************************************************
  68. //exported functions
  69. //********************************************************************************
  70. // LUICLASS * LUIInit(HWND hwnd,TestStruct *Tests, TestSettingsStruct *TestSettings, BOOL bLOR = FALSE);
  71. //
  72. // Parameters:
  73. // hwnd: Handle of parent window
  74. // Tests: Array of TestStructs. Creates menu options
  75. // under the Test Menu.
  76. // nItemID == 0 - a line
  77. // nItemID Range = 2000-2500
  78. // This structure must be in order
  79. //
  80. // TestSettings:Array of TestSettingsStructs. Creates menu option
  81. // under the Settings Menu
  82. // nItemID Range = 2500-3000
  83. // nItemID == 0 - a line
  84. //
  85. // bLOR: TRUE - use LOR logging
  86. //
  87. // Purpose: Takes a default window and creates a
  88. // standardized test menu, logging
  89. // area and supported logging functions
  90. //
  91. // Notes: All options in the Test and Test Settings
  92. // menus must be implemented by the calling
  93. // .exe
  94. //
  95. //********************************************************************************
  96. //********************************************************************************
  97. // BOOL LUICLASS::LUIOut(LOGLEVEL Level, LPSTR lpszString, ...);
  98. //
  99. // Parameters:
  100. // Level: Specifies format of string
  101. // lpszString: String to display
  102. //
  103. // Purpose: Adds a string to the bottom of the log
  104. //
  105. //********************************************************************************
  106. //********************************************************************************
  107. // void LUICLASS::LUIMsgHandler(UINT message, UINT wParam, LONG lParam);
  108. //
  109. // Purpose: Handles messages meant for log engine. Should be first function
  110. // called by WndProc
  111. //
  112. // Other Messages Prehandled:
  113. // WM_SIZE
  114. // WM_CLOSE
  115. //********************************************************************************
  116. //internal functions accessible by default menu
  117. // File
  118. //********************************************************************************
  119. // BOOL SaveLog(void);
  120. //
  121. // Parameters:
  122. // Purpose:
  123. //
  124. //********************************************************************************
  125. //********************************************************************************
  126. // BOOL OpenLog(void);
  127. //
  128. // Parameters:
  129. // Purpose:
  130. //
  131. //********************************************************************************
  132. //********************************************************************************
  133. // BOOL Exit(void);
  134. //
  135. // Parameters:
  136. // Purpose:
  137. //
  138. //********************************************************************************
  139. //********************************************************************************
  140. // BOOL PrintLog(void);//not imp
  141. //
  142. // Parameters:
  143. // Purpose:
  144. //
  145. //********************************************************************************
  146. // Edit
  147. //********************************************************************************
  148. // BOOL Copy(void);//not imp
  149. //
  150. // Parameters:
  151. // Purpose:
  152. //
  153. //********************************************************************************
  154. //********************************************************************************
  155. // BOOL Clear(void);
  156. //
  157. // Parameters:
  158. // Purpose:
  159. //
  160. //********************************************************************************
  161. //********************************************************************************
  162. // BOOL Settings(void);
  163. //
  164. // Parameters:
  165. // Purpose:
  166. //
  167. //********************************************************************************
  168. //Internal only functions
  169. //********************************************************************************
  170. // BOOL MakeMenu(void);
  171. //
  172. // Parameters:
  173. // Purpose:
  174. //
  175. //********************************************************************************