42{
52
54 {
55 skip(
"Failed to init WS2\n");
56 return;
57 }
58
62
65 {
66 skip(
"Cannot create socket\n");
68 }
69
74
76 {
77 skip(
"Cannot bind socket\n");
78 goto quit2;
79 }
80
82 {
83 skip(
"Cannot listen on socket\n");
84 goto quit2;
85 }
86
88 {
89 ok(TcpTableOwnerMod->dwNumEntries > 0,
"No TCP connections?!\n");
90
92 for (
i = 0;
i < TcpTableOwnerMod->dwNumEntries; ++
i)
93 {
95 TcpTableOwnerMod->table[
i].dwLocalAddr == 0 &&
96 TcpTableOwnerMod->table[
i].dwLocalPort ==
htons(9876) &&
97 TcpTableOwnerMod->table[
i].dwRemoteAddr == 0)
98 {
100 break;
101 }
102 }
103
105 {
106 skip(
"Our socket wasn't found!\n");
107 }
108 else
109 {
112
113 ok(TcpTableOwnerMod->table[
i].dwOwningPid == Pid,
"Invalid owner\n");
114
115 ok(TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart >= CreationTime.
QuadPart,
"Invalid time\n");
116 ok(TcpTableOwnerMod->table[
i].liCreateTimestamp.QuadPart <= CreationTime.
QuadPart + 60000000000LL,
"Invalid time\n");
117
119 {
121 ok(BasicInfo !=
NULL,
"HeapAlloc failed\n");
122
124 {
127
129 {
132
135 }
136 else
137 {
138 skip(
"GetModuleFileNameW failed\n");
139 }
140 }
141 else
142 {
143 skip(
"GetOwnerModuleFromTcpEntry failed\n");
144 }
145 }
146 else
147 {
148 skip(
"GetOwnerModuleFromTcpEntry failed\n");
149 }
150 }
151
153 }
154 else
155 {
156 skip(
"GetExtendedTcpTableWithAlloc failure\n");
157 }
158
159quit2:
163}
static DWORD GetExtendedTcpTableWithAlloc(PVOID *TcpTable, BOOL Order, DWORD Family, TCP_TABLE_CLASS Class)
void quit(int argc, const char *argv[])
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
struct _FileName FileName
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 GetOwnerModuleFromTcpEntry(PMIB_TCPROW_OWNER_MODULE pTcpEntry, TCPIP_OWNER_MODULE_INFO_CLASS Class, PVOID Buffer, PDWORD pdwSize)
@ TCPIP_OWNER_MODULE_INFO_BASIC
@ TCP_TABLE_OWNER_MODULE_LISTENER
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
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)
static rfbScreenInfoPtr server
DWORD WINAPI GetCurrentProcessId(void)
int PASCAL FAR WSACleanup(void)