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.

220 lines
9.1 KiB

  1. /////////////////////////////////////////////////////////////
  2. //
  3. // ActiveX Defintion Of The Shell Interface
  4. //
  5. [
  6. uuid(CD19DEC0-3B5A-11d0-B39A-0080C7BC7884),
  7. helpstring("Terminal Bench Scripting Host")
  8. ]
  9. library TBScript
  10. {
  11. importlib("stdole32.tlb");
  12. [ uuid(CD19DEC1-3B5A-11d0-B39A-0080C7BC7884), object, dual ]
  13. interface ITBShell : IDispatch
  14. {
  15. HRESULT Connect([out, retval] BOOL *Result);
  16. HRESULT ConnectEx([in] BSTR ServerName, [in] BSTR UserName,
  17. [in] BSTR Password, [in] BSTR Domain,
  18. [in] INT xRes, [in] INT yRes, [in] INT Flags, [in] INT BPP,
  19. [in] INT AudioFlags, [out, retval] BOOL *Result);
  20. HRESULT IsConnected([out, retval] BOOL *Result);
  21. HRESULT Logoff([out, retval] BOOL *Result);
  22. HRESULT Disconnect([out, retval] BOOL *Result);
  23. HRESULT GetBuildNumber([out, retval] DWORD *BuildNum);
  24. HRESULT GetCurrentUserName([out, retval] BSTR *UserName);
  25. HRESULT GetLastError([out, retval] BSTR *LastError);
  26. HRESULT TypeText([in] BSTR Text,
  27. [in, defaultvalue(0)] UINT WordsPerMin,
  28. [out, retval] BOOL *Result);
  29. HRESULT WaitForText([in] BSTR Text,
  30. [in, defaultvalue(-1)] INT Timeout,
  31. [out, retval] BOOL *Result);
  32. HRESULT WaitForTextAndSleep([in] BSTR Text,
  33. [in] INT Time, [out, retval] BOOL *Result);
  34. HRESULT SendMessage([in] UINT Message, [in] WPARAM wParam,
  35. [in] LPARAM lParam, [out, retval] BOOL *Result);
  36. HRESULT KeyAlt([in] BSTR Key, [out, retval] BOOL *Result);
  37. HRESULT KeyCtrl([in] BSTR Key, [out, retval] BOOL *Result);
  38. HRESULT KeyDown([in] BSTR Key, [out, retval] BOOL *Result);
  39. HRESULT KeyPress([in] BSTR Key, [out, retval] BOOL *Result);
  40. HRESULT KeyUp([in] BSTR Key, [out, retval] BOOL *Result);
  41. HRESULT VKeyAlt([in] INT KeyCode, [out, retval] BOOL *Result);
  42. HRESULT VKeyCtrl([in] INT KeyCode, [out, retval] BOOL *Result);
  43. HRESULT VKeyDown([in] INT KeyCode, [out, retval] BOOL *Result);
  44. HRESULT VKeyPress([in] INT KeyCode, [out, retval] BOOL *Result);
  45. HRESULT VKeyUp([in] INT KeyCode, [out, retval] BOOL *Result);
  46. HRESULT OpenStartMenu([out, retval] BOOL *Result);
  47. HRESULT OpenSystemMenu([out, retval] BOOL *Result);
  48. HRESULT Maximize([out, retval] BOOL *Result);
  49. HRESULT Minimize([out, retval] BOOL *Result);
  50. HRESULT Start([in] BSTR Name, [out, retval] BOOL *Result);
  51. HRESULT SwitchToProcess([in] BSTR Name, [out, retval] BOOL *Result);
  52. }
  53. [ uuid(CD19DEC3-3B5A-11d0-B39A-0080C7BC7884) ]
  54. coclass CTBShell
  55. {
  56. [default] interface ITBShell;
  57. }
  58. midl_pragma warning( disable: 2362 )
  59. [ uuid(CD19DEC1-3B5A-11d0-B39A-0080C7BC7885), object, dual ]
  60. interface ITBGlobal : IDispatch
  61. {
  62. HRESULT DebugAlert([in] BSTR Text);
  63. HRESULT DebugMessage([in] BSTR Text);
  64. HRESULT GetArguments([out, retval] BSTR *Args);
  65. HRESULT GetDesiredUserName([out, retval] BSTR *UserName);
  66. HRESULT GetDefaultWPM([out, retval] DWORD *WordsPerMinute);
  67. HRESULT SetDefaultWPM([in] DWORD WordsPerMinute);
  68. HRESULT GetLatency([out, retval] DWORD *Latency);
  69. HRESULT SetLatency([in] DWORD Latency);
  70. HRESULT LoadScript([in] BSTR FileName, [out, retval] BOOL *Result);
  71. HRESULT Sleep([in] DWORD Milliseconds);
  72. HRESULT GetInterval([out, retval] DWORD *Time);
  73. HRESULT DeleteFile([in] BSTR FileName, [out, retval] BOOL *Result);
  74. HRESULT MoveFile([in] BSTR OldFileName,
  75. [in] BSTR NewFileName, [out, retval] BOOL *Result);
  76. HRESULT CopyFile([in] BSTR OldFileName,
  77. [in] BSTR NewFileName, [out, retval] BOOL *Result);
  78. HRESULT CreateDirectory([in] BSTR DirName,
  79. [out, retval] BOOL *Result);
  80. HRESULT RemoveDirectory([in] BSTR DirName,
  81. [out, retval] BOOL *Result);
  82. HRESULT FileExists([in] BSTR FileName, [out, retval] BOOL *Result);
  83. HRESULT SetCurrentDirectory([in] BSTR Directory,
  84. [out, retval] BOOL *Result);
  85. HRESULT GetCurrentDirectory([out, retval] BSTR *Directory);
  86. HRESULT WriteToFile([in] BSTR FileName,
  87. [in] BSTR Text, [out, retval] BOOL *Result);
  88. HRESULT WinCommand([in] BSTR Command, [out, retval] DWORD *Result);
  89. HRESULT WinExecute([in] BSTR Command, [out, retval] BOOL *Result);
  90. #ifdef PROP
  91. #undef PROP
  92. #endif
  93. #define PROP(Name) [propget] HRESULT Name([out, retval] DWORD *Result)
  94. PROP(TSFLAG_COMPRESSION);
  95. PROP(TSFLAG_BITMAPCACHE);
  96. PROP(TSFLAG_FULLSCREEN);
  97. PROP(VK_CANCEL); // Control-break processing
  98. PROP(VK_BACK); // BACKSPACE key
  99. PROP(VK_TAB); // TAB key
  100. PROP(VK_CLEAR); // CLEAR key
  101. PROP(VK_RETURN); // ENTER key
  102. PROP(VK_ENTER); // ENTER key (backward compatibility ONLY)
  103. PROP(VK_SHIFT); // SHIFT key
  104. PROP(VK_CONTROL); // CTRL key
  105. PROP(VK_MENU); // ALT key
  106. PROP(VK_PAUSE); // PAUSE key
  107. PROP(VK_ESCAPE); // ESC key
  108. PROP(VK_SPACE); // SPACEBAR
  109. PROP(VK_PRIOR); // PAGE UP key
  110. PROP(VK_NEXT); // PAGE DOWN key
  111. PROP(VK_END); // END key
  112. PROP(VK_HOME); // HOME key
  113. PROP(VK_LEFT); // LEFT ARROW key
  114. PROP(VK_UP); // UP ARROW key
  115. PROP(VK_RIGHT); // RIGHT ARROW key
  116. PROP(VK_DOWN); // DOWN ARROW key
  117. PROP(VK_SNAPSHOT); // PRINT SCREEN key
  118. PROP(VK_INSERT); // INS key
  119. PROP(VK_DELETE); // DEL key
  120. PROP(VK_0); // 0 key
  121. PROP(VK_1); // 1 key
  122. PROP(VK_2); // 2 key
  123. PROP(VK_3); // 3 key
  124. PROP(VK_4); // 4 key
  125. PROP(VK_5); // 5 key
  126. PROP(VK_6); // 6 key
  127. PROP(VK_7); // 7 key
  128. PROP(VK_8); // 8 key
  129. PROP(VK_9); // 9 key
  130. PROP(VK_A); // A key
  131. PROP(VK_B); // B key
  132. PROP(VK_C); // C key
  133. PROP(VK_D); // D key
  134. PROP(VK_E); // E key
  135. PROP(VK_F); // F key
  136. PROP(VK_G); // G key
  137. PROP(VK_H); // H key
  138. PROP(VK_I); // I key
  139. PROP(VK_J); // J key
  140. PROP(VK_K); // K key
  141. PROP(VK_L); // L key
  142. PROP(VK_M); // M key
  143. PROP(VK_N); // N key
  144. PROP(VK_O); // O key
  145. PROP(VK_P); // P key
  146. PROP(VK_Q); // Q key
  147. PROP(VK_R); // R key
  148. PROP(VK_S); // S key
  149. PROP(VK_T); // T key
  150. PROP(VK_U); // U key
  151. PROP(VK_V); // V key
  152. PROP(VK_W); // W key
  153. PROP(VK_X); // X key
  154. PROP(VK_Y); // Y key
  155. PROP(VK_Z); // Z key
  156. PROP(VK_LWIN); // Left Windows key
  157. PROP(VK_RWIN); // Right Windows key
  158. PROP(VK_APPS); // Applications key
  159. PROP(VK_NUMPAD0); // Numeric keypad 0 key
  160. PROP(VK_NUMPAD1); // Numeric keypad 1 key
  161. PROP(VK_NUMPAD2); // Numeric keypad 2 key
  162. PROP(VK_NUMPAD3); // Numeric keypad 3 key
  163. PROP(VK_NUMPAD4); // Numeric keypad 4 key
  164. PROP(VK_NUMPAD5); // Numeric keypad 5 key
  165. PROP(VK_NUMPAD6); // Numeric keypad 6 key
  166. PROP(VK_NUMPAD7); // Numeric keypad 7 key
  167. PROP(VK_NUMPAD8); // Numeric keypad 8 key
  168. PROP(VK_NUMPAD9); // Numeric keypad 9 key
  169. PROP(VK_MULTIPLY); // Multiply key
  170. PROP(VK_ADD); // Add key
  171. PROP(VK_SEPARATOR); // Separator key
  172. PROP(VK_SUBTRACT); // Subtract key
  173. PROP(VK_DECIMAL); // Decimal key
  174. PROP(VK_DIVIDE); // Divide key
  175. PROP(VK_F1); // F1 key
  176. PROP(VK_F2); // F2 key
  177. PROP(VK_F3); // F3 key
  178. PROP(VK_F4); // F4 key
  179. PROP(VK_F5); // F5 key
  180. PROP(VK_F6); // F6 key
  181. PROP(VK_F7); // F7 key
  182. PROP(VK_F8); // F8 key
  183. PROP(VK_F9); // F9 key
  184. PROP(VK_F10); // F10 key
  185. PROP(VK_F11); // F11 key
  186. PROP(VK_F12); // F12 key
  187. PROP(VK_F13); // F13 key
  188. PROP(VK_F14); // F14 key
  189. PROP(VK_F15); // F15 key
  190. PROP(VK_F16); // F16 key
  191. PROP(VK_F17); // F17 key
  192. PROP(VK_F18); // F18 key
  193. PROP(VK_F19); // F19 key
  194. PROP(VK_F20); // F20 key
  195. PROP(VK_F21); // F21 key
  196. PROP(VK_F22); // F22 key
  197. PROP(VK_F23); // F23 key
  198. PROP(VK_F24); // F24 key
  199. }
  200. midl_pragma warning( default: 2362 )
  201. [ uuid(CD19DEC3-3B5A-11d0-B39A-0080C7BC7885) ]
  202. coclass CTBGlobal
  203. {
  204. [default] interface ITBGlobal;
  205. }
  206. }