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.

131 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. ksacapi.c
  5. Abstract:
  6. This is the C library header used to interface to SAC driver.
  7. Author:
  8. Brian Guarraci (briangu)
  9. Revision History:
  10. --*/
  11. #ifndef _KSAC_API_H
  12. #define _KSAC_API_H
  13. #include <ksacapip.h>
  14. #include <ntddsac.h>
  15. //
  16. // This structure contains the Sac Channel Handle
  17. // as well as kernel mode specific attributes
  18. //
  19. typedef struct _KSAC_CHANNEL_HANDLE {
  20. SAC_CHANNEL_HANDLE ChannelHandle;
  21. HANDLE SacEventHandle;
  22. PKEVENT SacEvent;
  23. } KSAC_CHANNEL_HANDLE, *PKSAC_CHANNEL_HANDLE;
  24. //
  25. // this should really be in windefs or somewhere like that.
  26. //
  27. typedef const PBYTE PCBYTE;
  28. typedef const PWCHAR PCWCHAR;
  29. BOOL
  30. KSacChannelOpen(
  31. OUT PKSAC_CHANNEL_HANDLE SacChannelHandle,
  32. IN PSAC_CHANNEL_OPEN_ATTRIBUTES SacChannelAttributes
  33. );
  34. BOOL
  35. KSacChannelClose(
  36. IN OUT PKSAC_CHANNEL_HANDLE SacChannelHandle
  37. );
  38. BOOL
  39. KSacChannelWrite(
  40. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  41. IN PCBYTE Buffer,
  42. IN ULONG BufferSize
  43. );
  44. BOOL
  45. KSacChannelRawWrite(
  46. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  47. IN PCBYTE Buffer,
  48. IN ULONG BufferSize
  49. );
  50. BOOL
  51. KSacChannelVTUTF8Write(
  52. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  53. IN PCWCHAR Buffer,
  54. IN ULONG BufferSize
  55. );
  56. BOOL
  57. KSacChannelVTUTF8WriteString(
  58. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  59. IN PCWSTR String
  60. );
  61. BOOL
  62. KSacChannelHasNewData(
  63. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  64. OUT PBOOL InputWaiting
  65. );
  66. BOOL
  67. KSacChannelGetAttribute(
  68. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  69. IN SAC_CHANNEL_ATTRIBUTE SacChannelAttribute,
  70. OUT PSAC_RSP_GET_CHANNEL_ATTRIBUTE SacChannelAttributeValue
  71. );
  72. BOOL
  73. KSacChannelSetAttribute(
  74. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  75. IN SAC_CHANNEL_ATTRIBUTE SacChannelAttribute,
  76. IN PVOID SacChannelAttributeValue
  77. );
  78. BOOL
  79. KSacChannelGetStatus(
  80. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  81. OUT PSAC_CHANNEL_STATUS SacChannelStatus
  82. );
  83. BOOL
  84. KSacChannelRead(
  85. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  86. OUT PBYTE Buffer,
  87. IN ULONG BufferSize,
  88. OUT PULONG ByteCount
  89. );
  90. BOOL
  91. KSacChannelRawRead(
  92. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  93. OUT PBYTE Buffer,
  94. IN ULONG BufferSize,
  95. OUT PULONG ByteCount
  96. );
  97. BOOL
  98. KSacChannelVTUTF8Read(
  99. IN KSAC_CHANNEL_HANDLE SacChannelHandle,
  100. OUT PWSTR Buffer,
  101. IN ULONG BufferSize,
  102. OUT PULONG ByteCount
  103. );
  104. #endif