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.

149 lines
1.8 KiB

  1. /*
  2. * Copyright (c) Microsoft Corporation
  3. *
  4. * Module Name :
  5. * proto.h
  6. *
  7. * Contains the prototypes of all the functions used by the service.
  8. *
  9. *
  10. * Sadagopan Rajaram -- Oct 18, 1999
  11. *
  12. */
  13. VOID
  14. ServiceEntry(
  15. DWORD NumArgs,
  16. LPTSTR *ArgsArray
  17. );
  18. DWORD
  19. ProcessRequests(
  20. SOCKET socket
  21. );
  22. DWORD
  23. InitializeComPortConnection(
  24. SOCKET cli_sock
  25. );
  26. NTSTATUS Initialize(
  27. );
  28. NTSTATUS
  29. InitializeComPort(
  30. PCOM_PORT_INFO pComPortInfo
  31. );
  32. SOCKET
  33. ServerSocket(
  34. );
  35. VOID
  36. Shutdown(
  37. NTSTATUS Status
  38. );
  39. DWORD
  40. bridge(
  41. PCOM_PORT_INFO pComPortInfo
  42. );
  43. VOID
  44. CALLBACK
  45. updateComPort(
  46. IN DWORD dwError,
  47. IN DWORD cbTransferred,
  48. IN LPWSAOVERLAPPED lpOverlapped,
  49. IN DWORD dwFlags
  50. );
  51. VOID
  52. updateClients(
  53. PCOM_PORT_INFO pComPortInfo
  54. );
  55. VOID CleanupSocket(
  56. PCONNECTION_INFO pConn
  57. );
  58. PCOM_PORT_INFO
  59. FindDevice(
  60. LPTSTR device,
  61. int *pIndex
  62. );
  63. NTSTATUS
  64. AddComPort(
  65. PCOM_PORT_INFO pComPortInfo
  66. );
  67. NTSTATUS
  68. DeleteComPort(
  69. LPTSTR device
  70. );
  71. LONG
  72. GetNextParameter(
  73. HKEY hKey,
  74. DWORD dwIndex,
  75. PHKEY pChild,
  76. LPTSTR *Name
  77. );
  78. LONG
  79. GetNameOfDeviceFromRegistry(
  80. HKEY hKey,
  81. LPTSTR *device
  82. );
  83. PCOM_PORT_INFO
  84. GetComPortParameters(
  85. HKEY hKey
  86. );
  87. VOID
  88. FreeComPortInfo(
  89. PCOM_PORT_INFO pTemp
  90. );
  91. VOID UpdateChanges(
  92. );
  93. VOID
  94. ServiceControlHandler(
  95. IN DWORD Opcode
  96. );
  97. NTSTATUS
  98. InitializeThread(
  99. PCOM_PORT_INFO pComPortInfo
  100. );
  101. int GetBufferInfo(
  102. PCONNECTION_INFO pConnection,
  103. PCOM_PORT_INFO pComPortInfo
  104. );
  105. VOID Enqueue(
  106. PCOM_PORT_INFO pComPortInfo
  107. );
  108. int
  109. ComPortInfoCompare(
  110. PCOM_PORT_INFO com1,
  111. PCOM_PORT_INFO com2
  112. );
  113. LONG
  114. TCLock(
  115. PHANDLE lock
  116. );
  117. VOID
  118. TCUnlock(
  119. HANDLE lock
  120. );