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.

134 lines
5.2 KiB

  1. /* File: cloop.h (created 12/27/93, JKH)
  2. *
  3. * Copyright 1994 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 1 $
  7. * $Date: 10/05/98 12:39p $
  8. */
  9. /* --- Constants --- */
  10. // Values for usAction argument of CLoopRcvControl & CLoopSndControl
  11. #define CLOOP_SUSPEND 1
  12. #define CLOOP_RESUME 0
  13. // Values for usAction argument of CLoopControl
  14. #define CLOOP_SET 1
  15. #define CLOOP_CLEAR 0
  16. // Values to return from chain functions
  17. #define CLOOP_KEEP 0
  18. #define CLOOP_DISCARD 1
  19. // usReason values for CLoopRcvControl()
  20. #define CLOOP_RB_NODATA 0x0001
  21. #define CLOOP_RB_INACTIVE 0x0002
  22. #define CLOOP_RB_SCRLOCK 0x0004
  23. #define CLOOP_RB_SCRIPT 0x0008
  24. #define CLOOP_RB_TRANSFER 0x0010
  25. #define CLOOP_RB_PRINTING 0x0020 // see PrintAbortProc (prnecho.c)
  26. #define CLOOP_RB_CNCTDRV 0x0040
  27. // usReason values for CLoopSndControl()
  28. #define CLOOP_SB_NODATA 0x0001
  29. #define CLOOP_SB_INACTIVE 0x0002
  30. #define CLOOP_SB_SCRLOCK 0x0004
  31. #define CLOOP_SB_LINEWAIT 0x0008
  32. #define CLOOP_SB_PRINTING 0x0010 // see PrintAbortProc (prnecho.c)
  33. #define CLOOP_SB_DELAY 0x0020
  34. #define CLOOP_SB_UNCONNECTED 0x0040
  35. #define CLOOP_SB_CNCTDRV 0x0080
  36. // usReason values for CLoopControl()
  37. #define CLOOP_TERMINATE 0x0001
  38. #define CLOOP_TRANSFER_READY 0x0002
  39. #define CLOOP_CONNECTED 0x0004
  40. #define CLOOP_MBCS 0x0008
  41. #define CLOOP_SUPPRESS_DSP 0x8000
  42. // usOptions values for CLoopSend()
  43. #define CLOOP_KEYS 0x0001
  44. #define CLOOP_ALLOCATED 0x0002
  45. #define CLOOP_SHARED 0x0004
  46. #define CLOOP_GLBL_ALLOCATED 0x0008 // tell cloop to free with GlobalFree()
  47. /* --- Typedefs --- */
  48. // Support for remote input chaining functions
  49. typedef int (*CHAINFUNC)(ECHAR, void *);
  50. /* --- Function Prototypes --- */
  51. extern HCLOOP CLoopCreateHandle(const HSESSION hSession);
  52. extern void CLoopDestroyHandle(HCLOOP * const ppstCLoop);
  53. extern int CLoopActivate(const HCLOOP hCLoop);
  54. extern void CLoopDeactivate(const HCLOOP hCLoop);
  55. extern void CLoopReset(const HCLOOP hCLoop);
  56. extern void CLoopRcvControl(const HCLOOP hCLoop,
  57. const unsigned uAction,
  58. const unsigned uReason);
  59. extern void CLoopOverrideControl(const HCLOOP hCLoop, const int fOverride);
  60. extern void CLoopSndControl(const HCLOOP hCLoop,
  61. const unsigned uAction,
  62. const unsigned uReason);
  63. extern void CLoopControl(const HCLOOP hCLoop,
  64. unsigned uAction,
  65. unsigned uReason);
  66. extern void * CLoopRegisterRmtInputChain(const HCLOOP hCLoop,
  67. const CHAINFUNC pfFunc,
  68. void *pvUserData);
  69. extern void CLoopUnregisterRmtInputChain(void *pvHdl);
  70. extern int CLoopLoadHdl(const HCLOOP hCLoop);
  71. extern int CLoopSaveHdl(const HCLOOP hCLoop);
  72. extern int CLoopGetSendCRLF(const HCLOOP hCLoop);
  73. extern void CLoopSetSendCRLF(const HCLOOP hCLoop, const int fSendCRLF);
  74. extern int CLoopGetExpandBlankLines(const HCLOOP hCLoop);
  75. extern void CLoopSetExpandBlankLines(const HCLOOP hCLoop,
  76. const int fExpandBlankLines);
  77. extern int CLoopGetLocalEcho(const HCLOOP hCLoop);
  78. extern void CLoopSetLocalEcho(const HCLOOP hCLoop, const int fLocalEcho);
  79. extern int CLoopGetLineWait(const HCLOOP hCLoop);
  80. extern void CLoopSetLineWait(const HCLOOP hCLoop, const int fLineWait);
  81. extern TCHAR CLoopGetWaitChar(const HCLOOP hCLoop);
  82. extern void CLoopSetWaitChar(const HCLOOP hCLoop, TCHAR chWaitChar);
  83. extern int CLoopGetExpandTabsOut(const HCLOOP hCLoop);
  84. extern void CLoopSetExpandTabsOut(const HCLOOP hCLoop,
  85. const int fExpandTabsOut);
  86. extern int CLoopGetTabSizeOut(const HCLOOP hCLoop);
  87. extern void CLoopSetTabSizeOut(const HCLOOP hCLoop, const int nTabSizeOut);
  88. extern int CLoopGetLineDelay(const HCLOOP hCLoop);
  89. extern void CLoopSetLineDelay(const HCLOOP hCLoop, const int nLineDelay);
  90. extern int CLoopGetCharDelay(const HCLOOP hCLoop);
  91. extern void CLoopSetCharDelay(const HCLOOP hCLoop, const int nCharDelay);
  92. extern int CLoopGetAddLF(const HCLOOP hCLoop);
  93. extern void CLoopSetAddLF(const HCLOOP hCLoop, const int fAddLF);
  94. extern int CLoopGetASCII7(const HCLOOP hCLoop);
  95. extern void CLoopSetASCII7(const HCLOOP hCLoop, const int fASCII7);
  96. extern int CLoopGetEchoplex(const HCLOOP hCLoop);
  97. extern void CLoopSetEchoplex(const HCLOOP hCLoop, const int fEchoplex);
  98. //extern int CLoopGetWrapLines(const HCLOOP hCLoop);
  99. //extern void CLoopSetWrapLines(const HCLOOP hCLoop, const int fWrapLines);
  100. extern int CLoopGetShowHex(const HCLOOP hCLoop);
  101. extern void CLoopSetShowHex(const HCLOOP hCLoop, const int fShowHex);
  102. extern int CLoopGetTabSizeIn(const HCLOOP hCLoop);
  103. extern void CLoopSetTabSizeIn(const HCLOOP hCLoop, const int nTabSizeIn);
  104. extern int SetCLoopMBCSState(HCLOOP hCLoop, int nState);
  105. extern int QueryCLoopMBCSState(HCLOOP hCLoop);
  106. extern void CLoopCharOut(HCLOOP hCLoop, TCHAR chOut);
  107. extern void CLoopBufrOut(HCLOOP hCLoop, TCHAR *pchOut, int nLen);
  108. extern int CLoopSend
  109. (
  110. const HCLOOP hCLoop,
  111. void *pvData,
  112. const size_t sztItems,
  113. unsigned uOptions);
  114. extern int CLoopSendTextFile(const HCLOOP hCLoop, TCHAR *pszFileName);
  115. extern void CLoopClearOutput(const HCLOOP hCLoop);
  116. extern unsigned long CLoopGetOutputCount(const HCLOOP pstCLoop);
  117. extern int CLoopInitHdl(const HCLOOP pstCLoop);