Source code of Windows XP (NT5)
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.

302 lines
4.9 KiB

  1. /*************************************************************************
  2. *
  3. * icap.h
  4. *
  5. * This module contains routine prototypes for the ICA driver.
  6. *
  7. * Copyright 1998, Microsoft.
  8. *
  9. *************************************************************************/
  10. NTSTATUS
  11. DriverEntry (
  12. IN PDRIVER_OBJECT DriverObject,
  13. IN PUNICODE_STRING RegistryPath
  14. );
  15. BOOLEAN
  16. IcaInitializeData (
  17. VOID
  18. );
  19. VOID _cdecl
  20. IcaTrace(
  21. IN ULONG TraceClass,
  22. IN ULONG TraceEnable,
  23. IN CHAR * Format,
  24. IN ... );
  25. VOID
  26. IcaTraceBuffer(
  27. IN ULONG TraceClass,
  28. IN ULONG TraceEnable,
  29. IN PVOID pBuffer,
  30. IN ULONG ByteCount );
  31. VOID
  32. IcaTraceFormat(
  33. IN PICA_TRACE_INFO pTraceInfo,
  34. IN ULONG TraceClass,
  35. IN ULONG TraceEnable,
  36. IN PCHAR pData );
  37. NTSTATUS
  38. IcaDispatch (
  39. IN PDEVICE_OBJECT DeviceObject,
  40. IN PIRP Irp
  41. );
  42. NTSTATUS
  43. IcaCreateConnection (
  44. IN PIRP Irp,
  45. IN PIO_STACK_LOCATION IrpSp
  46. );
  47. NTSTATUS
  48. IcaCreateStack (
  49. IN PICA_CONNECTION pConnect,
  50. IN PICA_OPEN_PACKET openPacket,
  51. IN PIRP Irp,
  52. IN PIO_STACK_LOCATION IrpSp
  53. );
  54. NTSTATUS
  55. IcaCreateChannel (
  56. IN PICA_CONNECTION pConnect,
  57. IN PICA_OPEN_PACKET openPacket,
  58. IN PIRP Irp,
  59. IN PIO_STACK_LOCATION IrpSp
  60. );
  61. /*
  62. * Channel IO dispatch routines
  63. */
  64. NTSTATUS
  65. IcaDeviceControlKeyboard (
  66. IN PICA_CHANNEL pChannel,
  67. IN PIRP Irp,
  68. IN PIO_STACK_LOCATION IrpSp
  69. );
  70. NTSTATUS
  71. IcaDeviceControlMouse (
  72. IN PICA_CHANNEL pChannel,
  73. IN PIRP Irp,
  74. IN PIO_STACK_LOCATION IrpSp
  75. );
  76. NTSTATUS
  77. IcaDeviceControlVideo (
  78. IN PICA_CHANNEL pChannel,
  79. IN PIRP Irp,
  80. IN PIO_STACK_LOCATION IrpSp
  81. );
  82. NTSTATUS
  83. IcaDeviceControlBeep (
  84. IN PICA_CHANNEL pChannel,
  85. IN PIRP Irp,
  86. IN PIO_STACK_LOCATION IrpSp
  87. );
  88. NTSTATUS
  89. IcaDeviceControlConsole (
  90. IN PICA_CHANNEL pChannel,
  91. IN PIRP Irp,
  92. IN PIO_STACK_LOCATION IrpSp
  93. );
  94. NTSTATUS
  95. IcaDeviceControlVirtual (
  96. IN PICA_CHANNEL pChannel,
  97. IN PIRP Irp,
  98. IN PIO_STACK_LOCATION IrpSp
  99. );
  100. /*
  101. * Stack Driver (SD) call routine
  102. */
  103. NTSTATUS
  104. IcaCallDriver(
  105. IN PICA_CHANNEL pChannel,
  106. IN ULONG ProcIndex,
  107. IN PVOID pParms
  108. );
  109. /*
  110. * Miscellaneous worker routines
  111. */
  112. VOID
  113. IcaReferenceConnection(
  114. IN PICA_CONNECTION pConnect
  115. );
  116. VOID
  117. IcaDereferenceConnection(
  118. IN PICA_CONNECTION pConnect
  119. );
  120. PICA_CHANNEL
  121. IcaFindChannelByName(
  122. IN PICA_CONNECTION pConnect,
  123. IN CHANNELCLASS ChannelClass,
  124. IN PVIRTUALCHANNELNAME pVirtualName
  125. );
  126. PICA_CHANNEL
  127. IcaFindChannel(
  128. IN PICA_CONNECTION pConnect,
  129. IN CHANNELCLASS ChannelClass,
  130. IN VIRTUALCHANNELCLASS VirtualClass
  131. );
  132. VOID
  133. IcaReferenceChannel(
  134. IN PICA_CHANNEL pChannel
  135. );
  136. VOID IcaDereferenceChannel(IN PICA_CHANNEL);
  137. BOOLEAN IcaLockChannelTable(
  138. PERESOURCE pResource);
  139. void IcaUnlockChannelTable(
  140. PERESOURCE pResource);
  141. VOID
  142. IcaReferenceStack(
  143. IN PICA_STACK pStack
  144. );
  145. VOID
  146. IcaDereferenceStack(
  147. IN PICA_STACK pStack
  148. );
  149. VOID
  150. IcaReferenceSdLink(
  151. IN PSDLINK pSdLink
  152. );
  153. VOID
  154. IcaDereferenceSdLink(
  155. IN PSDLINK pSdLink
  156. );
  157. PSDLINK
  158. IcaGetNextSdLink(
  159. IN PSDLINK pSdLink
  160. );
  161. PSDLINK
  162. IcaGetPreviousSdLink(
  163. IN PSDLINK pSdLink
  164. );
  165. VOID
  166. IcaKeepAliveThread(
  167. IN PVOID pData
  168. );
  169. /*
  170. * Internal versions of Stack Driver helper routines
  171. */
  172. NTSTATUS
  173. IcaBufferAllocInternal(
  174. IN PSDCONTEXT pContext,
  175. IN BOOLEAN bWait,
  176. IN BOOLEAN bControl,
  177. IN ULONG ByteCount,
  178. IN POUTBUF pOutBufOrig,
  179. OUT POUTBUF *ppOutBuf
  180. );
  181. VOID
  182. IcaBufferFreeInternal(
  183. IN PSDCONTEXT pContext,
  184. IN POUTBUF pOutBuf
  185. );
  186. NTSTATUS
  187. IcaRawInputInternal(
  188. IN PICA_STACK pStack,
  189. IN PINBUF pInBuf OPTIONAL,
  190. IN PCHAR pBuffer OPTIONAL,
  191. IN ULONG ByteCount
  192. );
  193. NTSTATUS
  194. IcaChannelInputInternal(
  195. IN PICA_STACK pStack,
  196. IN CHANNELCLASS ChannelClass,
  197. IN VIRTUALCHANNELCLASS VirtualClass,
  198. IN PINBUF pInBuf OPTIONAL,
  199. IN PCHAR pBuffer OPTIONAL,
  200. IN ULONG ByteCount
  201. );
  202. void
  203. IcaInitializeHandleTable(
  204. void
  205. );
  206. void
  207. IcaCleanupHandleTable(
  208. void
  209. );
  210. /*
  211. * Routines to handle fast IO.
  212. */
  213. #ifdef notdef
  214. BOOLEAN
  215. IcaFastIoRead (
  216. IN struct _FILE_OBJECT *FileObject,
  217. IN PLARGE_INTEGER FileOffset,
  218. IN ULONG Length,
  219. IN BOOLEAN Wait,
  220. IN ULONG LockKey,
  221. OUT PVOID Buffer,
  222. OUT PIO_STATUS_BLOCK IoStatus,
  223. IN struct _DEVICE_OBJECT *DeviceObject
  224. );
  225. BOOLEAN
  226. IcaFastIoWrite (
  227. IN struct _FILE_OBJECT *FileObject,
  228. IN PLARGE_INTEGER FileOffset,
  229. IN ULONG Length,
  230. IN BOOLEAN Wait,
  231. IN ULONG LockKey,
  232. IN PVOID Buffer,
  233. OUT PIO_STATUS_BLOCK IoStatus,
  234. IN struct _DEVICE_OBJECT *DeviceObject
  235. );
  236. BOOLEAN
  237. IcaFastIoDeviceControl (
  238. IN struct _FILE_OBJECT *FileObject,
  239. IN BOOLEAN Wait,
  240. IN PVOID InputBuffer OPTIONAL,
  241. IN ULONG InputBufferLength,
  242. OUT PVOID OutputBuffer OPTIONAL,
  243. IN ULONG OutputBufferLength,
  244. IN ULONG IoControlCode,
  245. OUT PIO_STATUS_BLOCK IoStatus,
  246. IN struct _DEVICE_OBJECT *DeviceObject
  247. );
  248. #endif