windows-nt/Source/XPSP1/NT/base/headless/tcsrv/server/proto.h
2020-09-26 16:20:57 +08:00

150 lines
1.8 KiB
C

/*
* Copyright (c) Microsoft Corporation
*
* Module Name :
* proto.h
*
* Contains the prototypes of all the functions used by the service.
*
*
* Sadagopan Rajaram -- Oct 18, 1999
*
*/
VOID
ServiceEntry(
DWORD NumArgs,
LPTSTR *ArgsArray
);
DWORD
ProcessRequests(
SOCKET socket
);
DWORD
InitializeComPortConnection(
SOCKET cli_sock
);
NTSTATUS Initialize(
);
NTSTATUS
InitializeComPort(
PCOM_PORT_INFO pComPortInfo
);
SOCKET
ServerSocket(
);
VOID
Shutdown(
NTSTATUS Status
);
DWORD
bridge(
PCOM_PORT_INFO pComPortInfo
);
VOID
CALLBACK
updateComPort(
IN DWORD dwError,
IN DWORD cbTransferred,
IN LPWSAOVERLAPPED lpOverlapped,
IN DWORD dwFlags
);
VOID
updateClients(
PCOM_PORT_INFO pComPortInfo
);
VOID CleanupSocket(
PCONNECTION_INFO pConn
);
PCOM_PORT_INFO
FindDevice(
LPTSTR device,
int *pIndex
);
NTSTATUS
AddComPort(
PCOM_PORT_INFO pComPortInfo
);
NTSTATUS
DeleteComPort(
LPTSTR device
);
LONG
GetNextParameter(
HKEY hKey,
DWORD dwIndex,
PHKEY pChild,
LPTSTR *Name
);
LONG
GetNameOfDeviceFromRegistry(
HKEY hKey,
LPTSTR *device
);
PCOM_PORT_INFO
GetComPortParameters(
HKEY hKey
);
VOID
FreeComPortInfo(
PCOM_PORT_INFO pTemp
);
VOID UpdateChanges(
);
VOID
ServiceControlHandler(
IN DWORD Opcode
);
NTSTATUS
InitializeThread(
PCOM_PORT_INFO pComPortInfo
);
int GetBufferInfo(
PCONNECTION_INFO pConnection,
PCOM_PORT_INFO pComPortInfo
);
VOID Enqueue(
PCOM_PORT_INFO pComPortInfo
);
int
ComPortInfoCompare(
PCOM_PORT_INFO com1,
PCOM_PORT_INFO com2
);
LONG
TCLock(
PHANDLE lock
);
VOID
TCUnlock(
HANDLE lock
);