12#define WIN32_NO_STATUS
22 DWORD dwWin32ExitCode,
29 status.dwCurrentState = dwCurrentState;
30 status.dwWin32ExitCode = dwWin32ExitCode;
31 status.dwWaitHint = dwWaitHint;
33 status.dwServiceSpecificExitCode = 0;
40 status.dwControlsAccepted = 0;
51 status.dwCheckPoint = dwCheckPoint++;
81 if (*TcpTable ==
NULL)
108 if (*UdpTable ==
NULL)
283 service_ok(Teb->SubProcessTag != 0,
"SubProcessTag is not defined!\n");
287 skip(
"Failed to init WS2\n");
324 SC_HANDLE hSC =
NULL;
325 SC_HANDLE hService =
NULL;
378 trace(
"Service stopped. Going to restart it...\n");
386 L"NT AUTHORITY\\NetworkService",
L"",
static SERVICE_STATUS_HANDLE(WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR
static void service_ok(int cnd, const char *msg,...)
static void test_runner(BOOLEAN unicode, PCWSTR extra_args, int service_argc, void *service_argv)
static char service_nameA[100]
static WCHAR service_nameW[100]
static void service_process(BOOLEAN unicode)
static DWORD GetExtendedUdpTableWithAlloc(PVOID *UdpTable, BOOL Order, DWORD Family, UDP_TABLE_CLASS Class)
static BOOL start_service(PCSTR service_nameA, PCWSTR service_nameW)
static VOID WINAPI service_handler(DWORD ctrl)
static void test_udp(LPWSTR svc_name, DWORD service_tag)
static void WINAPI service_main(DWORD dwArgc, LPWSTR *lpszArgv)
static void my_test_server(PCSTR service_nameA, PCWSTR service_nameW, void *param)
static SERVICE_STATUS_HANDLE status_handle
static void test_tcp(LPWSTR svc_name, DWORD service_tag)
static DWORD GetExtendedTcpTableWithAlloc(PVOID *TcpTable, BOOL Order, DWORD Family, TCP_TABLE_CLASS Class)
static void report_service_status(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint)
void quit(int argc, const char *argv[])
static SERVICE_STATUS ServiceStatus
#define ERROR_INSUFFICIENT_BUFFER
#define HeapFree(x, y, z)
static const WCHAR Cleanup[]
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize, BOOL bOrder, ULONG ulAf, UDP_TABLE_CLASS TableClass, ULONG Reserved)
DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder, ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved)
DWORD WINAPI GetOwnerModuleFromUdpEntry(PMIB_UDPROW_OWNER_MODULE pUdpEntry, TCPIP_OWNER_MODULE_INFO_CLASS Class, PVOID Buffer, PDWORD pdwSize)
DWORD WINAPI GetOwnerModuleFromTcpEntry(PMIB_TCPROW_OWNER_MODULE pTcpEntry, TCPIP_OWNER_MODULE_INFO_CLASS Class, PVOID Buffer, PDWORD pdwSize)
@ TCPIP_OWNER_MODULE_INFO_BASIC
enum _TCP_TABLE_CLASS TCP_TABLE_CLASS
@ TCP_TABLE_OWNER_MODULE_LISTENER
enum _UDP_TABLE_CLASS UDP_TABLE_CLASS
#define UNREFERENCED_PARAMETER(P)
BOOL WINAPI QueryServiceStatus(SC_HANDLE hService, LPSERVICE_STATUS lpServiceStatus)
BOOL WINAPI DeleteService(SC_HANDLE hService)
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword, LPCWSTR lpDisplayName)
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
BOOL WINAPI StartServiceCtrlDispatcherW(const SERVICE_TABLE_ENTRYW *lpServiceStartTable)
SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR lpServiceName, LPHANDLER_FUNCTION lpHandlerProc)
BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus, LPSERVICE_STATUS lpServiceStatus)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
int winetest_get_mainargs(char ***pargv)
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
ULONGLONG OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE]
MIB_TCPROW_OWNER_MODULE table[1]
ULONGLONG OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE]
MIB_UDPROW_OWNER_MODULE table[1]
SC_HANDLE register_service_exW(SC_HANDLE scm_handle, PCWSTR test_name, PCWSTR service_name, PCWSTR extra_args OPTIONAL, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpLoadOrderGroup OPTIONAL, LPDWORD lpdwTagId OPTIONAL, LPCWSTR lpDependencies OPTIONAL, LPCWSTR lpServiceStartName OPTIONAL, LPCWSTR lpPassword OPTIONAL)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
static rfbScreenInfoPtr server
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentProcessId(void)
#define ERROR_SERVICE_NOT_ACTIVE
int PASCAL FAR WSACleanup(void)
#define SERVICE_ACCEPT_STOP
#define SERVICE_ALL_ACCESS
#define SERVICE_NO_CHANGE
#define SERVICE_STOP_PENDING
#define SERVICE_CONTROL_SHUTDOWN
#define SERVICE_START_PENDING
#define SERVICE_CONTROL_STOP
#define SERVICE_ACCEPT_SHUTDOWN
#define SC_MANAGER_ALL_ACCESS
#define SERVICE_DEMAND_START
#define SERVICE_INTERACTIVE_PROCESS
#define SERVICE_WIN32_OWN_PROCESS
#define SERVICE_ERROR_IGNORE