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.

137 lines
4.5 KiB

  1. //
  2. // tclient2.h
  3. //
  4. // This is the main header containing export information for the
  5. // TCLIENT export API update.
  6. //
  7. // Copyright (C) 2001 Microsoft Corporation
  8. //
  9. // Author: a-devjen (Devin Jenson)
  10. //
  11. #ifndef INC_TCLIENT2_H
  12. #define INC_TCLIENT2_H
  13. #include <windows.h>
  14. #include <sctypes.h>
  15. #include <protocol.h>
  16. // This API is C-style
  17. #ifdef __cplusplus
  18. #define TSAPI extern "C"
  19. #else
  20. #define TSAPI
  21. #endif
  22. // Words per minute
  23. #define T2_DEFAULT_WORDS_PER_MIN 35
  24. // Automatic latency between multi-commands
  25. #define T2_DEFAULT_LATENCY 250
  26. // Represents wait time as infinite (never ends)
  27. #define T2INFINITE -1
  28. #ifndef LIBINITDATA_DEFINED
  29. #define LIBINITDATA_DEFINED
  30. // The PrintMessage() callback function format
  31. typedef void (__cdecl *PFNPRINTMESSAGE) (MESSAGETYPE, LPCSTR, ...);
  32. // * IDLE_MESSAGE Info *
  33. //
  34. // Message String is defined as:
  35. // "(Idle %u Secs) %s [%X]"
  36. //
  37. // %u is the number of seconds the script has been
  38. // waiting on text, and %s is a string label of the
  39. // text the script is waiting on. Finally, %X
  40. // represents the HANDLE of the Connection.
  41. #endif // LIBINITDATA_DEFINED
  42. // The IdleCallback() callback function format
  43. typedef void (__cdecl *PFNIDLEMESSAGE) (HANDLE, LPCSTR, DWORD);
  44. // This is the callback routine which allows for monitoring of
  45. // clients and when they idle.
  46. // HANDLE Handle - Handle of the connection context via T2Connect()
  47. // LPCSTR Text - The text the script is waiting on, causing the idle
  48. // DWORD Seconds - Number of seconds the script has been idle. This
  49. // value is first indicated at 30 seconds, then it
  50. // is posted every additional 10 seconds (by default).
  51. // API Prototypes
  52. TSAPI LPCSTR T2Connect (LPCWSTR, LPCWSTR, LPCWSTR,
  53. LPCWSTR, INT, INT, HANDLE *);
  54. TSAPI LPCSTR T2ConnectEx (LPCWSTR, LPCWSTR, LPCWSTR,
  55. LPCWSTR, LPCWSTR, INT, INT,
  56. INT, INT, INT, HANDLE *);
  57. TSAPI LPCSTR T2Check (HANDLE, LPCSTR, LPCWSTR);
  58. TSAPI LPCSTR T2ClientTerminate (HANDLE);
  59. TSAPI LPCSTR T2Clipboard (HANDLE, INT, LPCSTR);
  60. TSAPI BOOL T2CloseClipboard (VOID);
  61. TSAPI LPCSTR T2Disconnect (HANDLE);
  62. TSAPI VOID T2FreeMem (PVOID);
  63. TSAPI LPCSTR T2GetBuildNumber (HANDLE, DWORD *);
  64. TSAPI LPCSTR T2GetClientScreen (HANDLE, INT, INT, INT, INT, UINT *, PVOID *);
  65. TSAPI LPCSTR T2GetFeedback (HANDLE, LPWSTR *, UINT *, UINT *);
  66. TSAPI LPCSTR T2GetParam (HANDLE, LPARAM *);
  67. TSAPI UINT T2GetSessionId (HANDLE);
  68. TSAPI VOID T2Init (SCINITDATA *, PFNIDLEMESSAGE);
  69. TSAPI BOOL T2IsHandle (HANDLE);
  70. TSAPI BOOL T2IsDead (HANDLE);
  71. TSAPI LPCSTR T2Logoff (HANDLE);
  72. TSAPI BOOL T2OpenClipboard (HWND);
  73. TSAPI LPCSTR T2PauseInput (HANDLE, BOOL);
  74. TSAPI LPCSTR T2RecvVCData (HANDLE, LPCSTR, PVOID, UINT, UINT *);
  75. TSAPI LPCSTR T2SaveClientScreen (HANDLE, INT, INT, INT, INT, LPCSTR);
  76. TSAPI LPCSTR T2SaveClipboard (HANDLE, LPCSTR, LPCSTR);
  77. TSAPI LPCSTR T2SendData (HANDLE, UINT, WPARAM, LPARAM);
  78. TSAPI LPCSTR T2SendMouseClick (HANDLE, UINT, UINT);
  79. TSAPI LPCSTR T2SendText (HANDLE, LPCWSTR);
  80. TSAPI LPCSTR T2SendVCData (HANDLE, LPCSTR, PVOID, UINT);
  81. TSAPI LPCSTR T2SetClientTopmost (HANDLE, LPCWSTR);
  82. TSAPI LPCSTR T2SetParam (HANDLE, LPARAM);
  83. TSAPI LPCSTR T2Start (HANDLE, LPCWSTR);
  84. TSAPI LPCSTR T2SwitchToProcess (HANDLE, LPCWSTR);
  85. TSAPI LPCSTR T2TypeText (HANDLE, LPCWSTR, UINT);
  86. TSAPI LPCSTR T2WaitForText (HANDLE, LPCWSTR, INT);
  87. TSAPI LPCSTR T2WaitForMultiple (HANDLE, LPCWSTR *, INT);
  88. TSAPI LPCSTR T2SetDefaultWPM (HANDLE, DWORD);
  89. TSAPI LPCSTR T2GetDefaultWPM (HANDLE, DWORD *);
  90. TSAPI LPCSTR T2SetLatency (HANDLE, DWORD);
  91. TSAPI LPCSTR T2GetLatency (HANDLE, DWORD *);
  92. TSAPI LPCSTR T2KeyAlt (HANDLE, WCHAR);
  93. TSAPI LPCSTR T2KeyCtrl (HANDLE, WCHAR);
  94. TSAPI LPCSTR T2KeyDown (HANDLE, WCHAR);
  95. TSAPI LPCSTR T2KeyPress (HANDLE, WCHAR);
  96. TSAPI LPCSTR T2KeyUp (HANDLE, WCHAR);
  97. TSAPI LPCSTR T2VKeyAlt (HANDLE, INT);
  98. TSAPI LPCSTR T2VKeyCtrl (HANDLE, INT);
  99. TSAPI LPCSTR T2VKeyDown (HANDLE, INT);
  100. TSAPI LPCSTR T2VKeyPress (HANDLE, INT);
  101. TSAPI LPCSTR T2VKeyUp (HANDLE, INT);
  102. #endif // INC_TCLIENT2_H