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.

92 lines
3.0 KiB

  1. //
  2. // CTBShell.h
  3. //
  4. // Contains the references for the shell object used in TBScript.
  5. //
  6. // Copyright (C) 2001 Microsoft Corporation
  7. //
  8. // Author: a-devjen (Devin Jenson)
  9. //
  10. #ifndef INC_CTBSHELL_H
  11. #define INC_CTBSHELL_H
  12. #include <windows.h>
  13. #include <stdio.h>
  14. #include <activscp.h>
  15. #include <olectl.h>
  16. #include <stddef.h>
  17. #include <tclient2.h>
  18. #include <tbscript.h>
  19. #include "scpapi.h"
  20. #include "ITBScript.h"
  21. class CTBShell : public ITBShell
  22. {
  23. public:
  24. CTBShell(void);
  25. ~CTBShell(void);
  26. void SetParam(LPARAM lParam);
  27. void SetDesiredData(TSClientData *DesiredDataPtr);
  28. void SetDefaultWPM(DWORD WordsPerMinute);
  29. DWORD GetDefaultWPM(void);
  30. DWORD GetLatency(void);
  31. void SetLatency(DWORD Latency);
  32. LPCWSTR GetArguments(void);
  33. LPCWSTR GetDesiredUserName(void);
  34. private:
  35. HRESULT RecordLastError(LPCSTR Error, BOOL *Result = NULL);
  36. HRESULT RecordOrThrow(LPCSTR Error,
  37. BOOL *Result = NULL, HRESULT ErrReturn = E_FAIL);
  38. STDMETHODIMP Connect(BOOL *Result);
  39. STDMETHODIMP ConnectEx(BSTR ServerName, BSTR UserName, BSTR Password,
  40. BSTR Domain, INT xRes, INT yRes, INT Flags,
  41. INT BPP, INT AudioFlags, BOOL *Result);
  42. STDMETHODIMP Disconnect(BOOL *Result);
  43. STDMETHODIMP GetBuildNumber(DWORD *BuildNum);
  44. STDMETHODIMP GetCurrentUserName(BSTR *UserName);
  45. STDMETHODIMP GetLastError(BSTR *LastError);
  46. STDMETHODIMP IsConnected(BOOL *Result);
  47. STDMETHODIMP Logoff(BOOL *Result);
  48. STDMETHODIMP WaitForText(BSTR Text, INT Timeout, BOOL *Result);
  49. STDMETHODIMP WaitForTextAndSleep(BSTR Text, INT Time, BOOL *Result);
  50. STDMETHODIMP SendMessage(UINT Message, WPARAM wParam,
  51. LPARAM lParam, BOOL *Result);
  52. STDMETHODIMP TypeText(BSTR Text, UINT WordsPerMin, BOOL *Result);
  53. STDMETHODIMP KeyAlt(BSTR Key, BOOL *Result);
  54. STDMETHODIMP KeyCtrl(BSTR Key, BOOL *Result);
  55. STDMETHODIMP KeyDown(BSTR Key, BOOL *Result);
  56. STDMETHODIMP KeyPress(BSTR Key, BOOL *Result);
  57. STDMETHODIMP KeyUp(BSTR Key, BOOL *Result);
  58. STDMETHODIMP VKeyAlt(INT KeyCode, BOOL *Result);
  59. STDMETHODIMP VKeyCtrl(INT KeyCode, BOOL *Result);
  60. STDMETHODIMP VKeyDown(INT KeyCode, BOOL *Result);
  61. STDMETHODIMP VKeyPress(INT KeyCode, BOOL *Result);
  62. STDMETHODIMP VKeyUp(INT KeyCode, BOOL *Result);
  63. STDMETHODIMP OpenStartMenu(BOOL *Result);
  64. STDMETHODIMP OpenSystemMenu(BOOL *Result);
  65. STDMETHODIMP Maximize(BOOL *Result);
  66. STDMETHODIMP Minimize(BOOL *Result);
  67. STDMETHODIMP Start(BSTR Name, BOOL *Result);
  68. STDMETHODIMP SwitchToProcess(BSTR Name, BOOL *Result);
  69. HANDLE Connection;
  70. OLECHAR CurrentUser[64];
  71. OLECHAR LastErrorString[1024];
  72. LPARAM lParam;
  73. TSClientData DesiredData;
  74. DWORD CurrentLatency;
  75. #include "virtual.h"
  76. };
  77. #endif // INC_CTBSHELL_H