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.

89 lines
2.2 KiB

  1. //
  2. // tbscript.h
  3. //
  4. // This is the main header containing export information for the TBScript API.
  5. //
  6. // Copyright (C) 2001 Microsoft Corporation
  7. //
  8. // Author: a-devjen (Devin Jenson)
  9. //
  10. #ifndef INC_TBSCRIPT_H
  11. #define INC_TBSCRIPT_H
  12. #include <windows.h>
  13. #include <wtypes.h>
  14. #include <tclient2.h>
  15. // This API is C-style (though written in C++ for COM reasons)
  16. #ifdef __cplusplus
  17. #define SCPAPI extern "C" __declspec(dllexport)
  18. #else
  19. #define SCPAPI __declspec(dllexport)
  20. #endif
  21. #define SIZEOF_ARRAY(a) (sizeof(a)/sizeof((a)[0]))
  22. // Number of characters for each buffer
  23. #define TSCLIENTDATA_BUFLEN 64
  24. #define TSCLIENTDATA_ARGLEN 1024
  25. // Simply defines "default" data
  26. typedef struct
  27. {
  28. OLECHAR Server[TSCLIENTDATA_BUFLEN];
  29. OLECHAR User[TSCLIENTDATA_BUFLEN];
  30. OLECHAR Pass[TSCLIENTDATA_BUFLEN];
  31. OLECHAR Domain[TSCLIENTDATA_BUFLEN];
  32. INT xRes;
  33. INT yRes;
  34. INT Flags;
  35. INT BPP;
  36. INT AudioFlags;
  37. DWORD WordsPerMinute;
  38. OLECHAR Arguments[TSCLIENTDATA_ARGLEN];
  39. } TSClientData;
  40. // Flags for TBClientData.Flags
  41. #define TSFLAG_COMPRESSION 0x01
  42. #define TSFLAG_BITMAPCACHE 0x02
  43. #define TSFLAG_FULLSCREEN 0x04
  44. // The IdleCallback() callback function format
  45. typedef void (__cdecl *PFNIDLECALLBACK) (LPARAM, LPCSTR, DWORD);
  46. // This is the callback routine which allows for monitoring of
  47. // clients and when they idle.
  48. //
  49. // LPARAM lParam - Parameter passed into the SCPRunScript function
  50. // LPCSTR Text - The text the script is waiting on, causing the idle
  51. // DWORD Seconds - Number of seconds the script has been idle. This
  52. // value is first indicated at 30 seconds, then it
  53. // is posted every additional 10 seconds (by default).
  54. // Resolution default
  55. #define SCP_DEFAULT_RES_X 640
  56. #define SCP_DEFAULT_RES_Y 480
  57. // Exporting API routines
  58. SCPAPI void SCPStartupLibrary(SCINITDATA *InitData,
  59. PFNIDLECALLBACK fnIdleCallback);
  60. SCPAPI void SCPCleanupLibrary(void);
  61. SCPAPI BOOL SCPRunScript(BSTR LangName,
  62. BSTR FileName, TSClientData *DesiredData, LPARAM lParam);
  63. SCPAPI void SCPDisplayEngines(void);
  64. #endif // INC_TBSCRIPT_H