ReactOS 0.4.16-dev-1946-g52006dd
rpc_epmap.c
Go to the documentation of this file.
1/*
2 * RPC endpoint mapper
3 *
4 * Copyright 2002 Greg Turner
5 * Copyright 2001 Ove Kåven, TransGaming Technologies
6 * Copyright 2008 Robert Shearman (for CodeWeavers)
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23#include <stdarg.h>
24
25#include "windef.h"
26#include "winbase.h"
27#include "winerror.h"
28#include "winsvc.h"
29
30#include "rpc.h"
31
32#include "wine/debug.h"
33#include "wine/exception.h"
34
35#include "rpc_binding.h"
36#include "epm.h"
37#include "epm_towers.h"
38
40
41/* The "real" RPC portmapper endpoints that I know of are:
42 *
43 * ncadg_ip_udp: 135
44 * ncacn_ip_tcp: 135
45 * ncacn_np: \\pipe\epmapper
46 * ncalrpc: epmapper
47 * ncacn_http: 593
48 *
49 * If the user's machine ran a DCE RPC daemon, it would
50 * probably be possible to connect to it, but there are many
51 * reasons not to, like:
52 * - the user probably does *not* run one, and probably
53 * shouldn't be forced to run one just for local COM
54 * - very few Unix systems use DCE RPC... if they run a RPC
55 * daemon at all, it's usually Sun RPC
56 * - DCE RPC registrations are persistent and saved on disk,
57 * while MS-RPC registrations are documented as non-persistent
58 * and stored only in RAM, and auto-destroyed when the process
59 * dies (something DCE RPC can't do)
60 *
61 * Of course, if the user *did* want to run a DCE RPC daemon anyway,
62 * there would be interoperability advantages, like the possibility
63 * of running a fully functional DCOM server using Wine...
64 */
65
66static const struct epm_endpoints
67{
68 const char *protseq;
69 const char *endpoint;
70} epm_endpoints[] =
71{
72 { "ncacn_np", "\\pipe\\epmapper" },
73 { "ncacn_ip_tcp", "135" },
74 { "ncacn_ip_udp", "135" },
75 { "ncalrpc", "epmapper" },
76 { "ncacn_http", "593" },
77};
78
79static BOOL start_rpcss(void)
80{
81 SC_HANDLE scm, service;
83 BOOL ret = FALSE;
84
85 TRACE("\n");
86
87 if (!(scm = OpenSCManagerW( NULL, NULL, 0 )))
88 {
89 ERR( "failed to open service manager\n" );
90 return FALSE;
91 }
92 if (!(service = OpenServiceW( scm, L"RpcSs", SERVICE_START | SERVICE_QUERY_STATUS )))
93 {
94 ERR( "failed to open RpcSs service\n" );
95 CloseServiceHandle( scm );
96 return FALSE;
97 }
99 {
100 ULONGLONG start_time = GetTickCount64();
101 do
102 {
103 DWORD dummy;
104
106 (BYTE *)&status, sizeof(status), &dummy ))
107 break;
108 if (status.dwCurrentState == SERVICE_RUNNING)
109 {
110 ret = TRUE;
111 break;
112 }
113 if (GetTickCount64() - start_time > 30000) break;
114 Sleep( 100 );
115
116 } while (status.dwCurrentState == SERVICE_START_PENDING);
117
118 if (status.dwCurrentState != SERVICE_RUNNING)
119 WARN( "RpcSs failed to start %lu\n", status.dwCurrentState );
120 }
121 else ERR( "failed to start RpcSs service\n" );
122
123 CloseServiceHandle( service );
124 CloseServiceHandle( scm );
125 return ret;
126}
127
129{
131 const char *protseq = bind->Protseq;
132 const char *network_addr = bind->NetworkAddr;
133
134 return (!strcmp(protseq, "ncalrpc") ||
135 (!strcmp(protseq, "ncacn_np") &&
136 (!network_addr || !strcmp(network_addr, "."))));
137}
138
140{
142 const char * pszEndpoint = NULL;
144 RpcBinding* epm_bind;
145 unsigned int i;
146
147 if (bind->server)
149
150 for (i = 0; i < ARRAY_SIZE(epm_endpoints); i++)
151 if (!strcmp(bind->Protseq, epm_endpoints[i].protseq))
152 pszEndpoint = epm_endpoints[i].endpoint;
153
154 if (!pszEndpoint)
155 {
156 FIXME("no endpoint for the endpoint-mapper found for protseq %s\n", debugstr_a(bind->Protseq));
158 }
159
160 status = RpcBindingCopy(handle, epm_handle);
161 if (status != RPC_S_OK) return status;
162
163 epm_bind = *epm_handle;
164 if (epm_bind->AuthInfo)
165 {
166 /* don't bother with authenticating against the EPM by default
167 * (see EnableAuthEpResolution registry value) */
168 RpcAuthInfo_Release(epm_bind->AuthInfo);
169 epm_bind->AuthInfo = NULL;
170 }
171 RPCRT4_ResolveBinding(epm_bind, pszEndpoint);
172 TRACE("RPC_S_OK\n");
173 return RPC_S_OK;
174}
175
177{
178 unsigned char string_binding[] = "ncacn_np:.[\\\\pipe\\\\epmapper]";
179
180 return RpcBindingFromStringBindingA(string_binding, epm_handle);
181}
182
184{
185 switch (__eptr->ExceptionRecord->ExceptionCode)
186 {
190 default:
192 }
193}
194
196 UUID_VECTOR *UuidVector, RPC_CSTR Annotation, BOOL replace )
197{
198 PRPC_SERVER_INTERFACE If = IfSpec;
199 ULONG i;
201 error_status_t status2;
202 ept_entry_t *entries;
204
205 TRACE("(%p,%p,%p,%s) replace=%d\n", IfSpec, BindingVector, UuidVector, debugstr_a((char*)Annotation), replace);
206 TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
207 for (i=0; i<BindingVector->Count; i++) {
208 RpcBinding* bind = BindingVector->BindingH[i];
209 TRACE(" protseq[%ld]=%s\n", i, debugstr_a(bind->Protseq));
210 TRACE(" endpoint[%ld]=%s\n", i, debugstr_a(bind->Endpoint));
211 }
212 if (UuidVector) {
213 for (i=0; i<UuidVector->Count; i++)
214 TRACE(" obj[%ld]=%s\n", i, debugstr_guid(UuidVector->Uuid[i]));
215 }
216
217 if (!BindingVector->Count) return RPC_S_OK;
218
219 entries = calloc(BindingVector->Count * (UuidVector ? UuidVector->Count : 1), sizeof(*entries));
220 if (!entries)
221 return RPC_S_OUT_OF_MEMORY;
222
224 if (status != RPC_S_OK)
225 {
226 free(entries);
227 return status;
228 }
229
230 for (i = 0; i < BindingVector->Count; i++)
231 {
232 unsigned j;
233 RpcBinding* bind = BindingVector->BindingH[i];
234 for (j = 0; j < (UuidVector ? UuidVector->Count : 1); j++)
235 {
237 bind->Protseq, bind->Endpoint,
238 bind->NetworkAddr,
239 &entries[i*(UuidVector ? UuidVector->Count : 1) + j].tower);
240 if (status != RPC_S_OK) break;
241
242 if (UuidVector)
243 memcpy(&entries[i * UuidVector->Count].object, &UuidVector->Uuid[j], sizeof(GUID));
244 else
245 memset(&entries[i].object, 0, sizeof(entries[i].object));
246 if (Annotation)
247 memcpy(entries[i].annotation, Annotation,
248 min(strlen((char *)Annotation) + 1, ept_max_annotation_size));
249 }
250 }
251
252 if (status == RPC_S_OK)
253 {
254 while (TRUE)
255 {
256 __TRY
257 {
258 ept_insert(handle, BindingVector->Count * (UuidVector ? UuidVector->Count : 1),
259 entries, replace, &status2);
260 }
262 {
263 status2 = GetExceptionCode();
264 }
266 if (status2 == RPC_S_SERVER_UNAVAILABLE &&
268 {
269 if (start_rpcss())
270 continue;
271 }
272 if (status2 != RPC_S_OK)
273 ERR("ept_insert failed with error %ld\n", status2);
274 status = status2; /* FIXME: convert status? */
275 break;
276 }
277 }
279
280 for (i = 0; i < BindingVector->Count; i++)
281 {
282 unsigned j;
283 for (j = 0; j < (UuidVector ? UuidVector->Count : 1); j++)
284 I_RpcFree(entries[i*(UuidVector ? UuidVector->Count : 1) + j].tower);
285 }
286
287 free(entries);
288
289 return status;
290}
291
292/***********************************************************************
293 * RpcEpRegisterA (RPCRT4.@)
294 */
296 UUID_VECTOR *UuidVector, RPC_CSTR Annotation )
297{
298 return epm_register(IfSpec, BindingVector, UuidVector, Annotation, TRUE);
299}
300
301/***********************************************************************
302 * RpcEpRegisterNoReplaceA (RPCRT4.@)
303 */
305 UUID_VECTOR *UuidVector, RPC_CSTR Annotation )
306{
307 return epm_register(IfSpec, BindingVector, UuidVector, Annotation, FALSE);
308}
309
310/***********************************************************************
311 * RpcEpRegisterW (RPCRT4.@)
312 */
314 UUID_VECTOR *UuidVector, RPC_WSTR Annotation )
315{
316 LPSTR annA = RPCRT4_strdupWtoA(Annotation);
318
319 status = epm_register(IfSpec, BindingVector, UuidVector, (RPC_CSTR)annA, TRUE);
320
321 free(annA);
322 return status;
323}
324
325/***********************************************************************
326 * RpcEpRegisterNoReplaceW (RPCRT4.@)
327 */
329 UUID_VECTOR *UuidVector, RPC_WSTR Annotation )
330{
331 LPSTR annA = RPCRT4_strdupWtoA(Annotation);
333
334 status = epm_register(IfSpec, BindingVector, UuidVector, (RPC_CSTR)annA, FALSE);
335
336 free(annA);
337 return status;
338}
339
340/***********************************************************************
341 * RpcEpUnregister (RPCRT4.@)
342 */
344 UUID_VECTOR *UuidVector )
345{
346 PRPC_SERVER_INTERFACE If = IfSpec;
347 ULONG i;
349 error_status_t status2;
350 ept_entry_t *entries;
352
353 TRACE("(%p,%p,%p)\n", IfSpec, BindingVector, UuidVector);
354 TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
355 for (i=0; i<BindingVector->Count; i++) {
356 RpcBinding* bind = BindingVector->BindingH[i];
357 TRACE(" protseq[%ld]=%s\n", i, debugstr_a(bind->Protseq));
358 TRACE(" endpoint[%ld]=%s\n", i, debugstr_a(bind->Endpoint));
359 }
360 if (UuidVector) {
361 for (i=0; i<UuidVector->Count; i++)
362 TRACE(" obj[%ld]=%s\n", i, debugstr_guid(UuidVector->Uuid[i]));
363 }
364
365 entries = calloc(BindingVector->Count * (UuidVector ? UuidVector->Count : 1), sizeof(*entries));
366 if (!entries)
367 return RPC_S_OUT_OF_MEMORY;
368
370 if (status != RPC_S_OK)
371 {
372 free(entries);
373 return status;
374 }
375
376 for (i = 0; i < BindingVector->Count; i++)
377 {
378 unsigned j;
379 RpcBinding* bind = BindingVector->BindingH[i];
380 for (j = 0; j < (UuidVector ? UuidVector->Count : 1); j++)
381 {
383 bind->Protseq, bind->Endpoint,
384 bind->NetworkAddr,
385 &entries[i*(UuidVector ? UuidVector->Count : 1) + j].tower);
386 if (status != RPC_S_OK) break;
387
388 if (UuidVector)
389 memcpy(&entries[i * UuidVector->Count + j].object, &UuidVector->Uuid[j], sizeof(GUID));
390 else
391 memset(&entries[i].object, 0, sizeof(entries[i].object));
392 }
393 }
394
395 if (status == RPC_S_OK)
396 {
397 __TRY
398 {
399 ept_insert(handle, BindingVector->Count * (UuidVector ? UuidVector->Count : 1),
400 entries, TRUE, &status2);
401 }
403 {
404 status2 = GetExceptionCode();
405 }
407 if (status2 == RPC_S_SERVER_UNAVAILABLE)
408 status2 = EPT_S_NOT_REGISTERED;
409 if (status2 != RPC_S_OK)
410 ERR("ept_insert failed with error %ld\n", status2);
411 status = status2; /* FIXME: convert status? */
412 }
414
415 for (i = 0; i < BindingVector->Count; i++)
416 {
417 unsigned j;
418 for (j = 0; j < (UuidVector ? UuidVector->Count : 1); j++)
419 I_RpcFree(entries[i*(UuidVector ? UuidVector->Count : 1) + j].tower);
420 }
421
422 free(entries);
423
424 return status;
425}
426
427/***********************************************************************
428 * RpcEpResolveBinding (RPCRT4.@)
429 */
431{
432 PRPC_CLIENT_INTERFACE If = IfSpec;
435 error_status_t status2;
437 ept_lookup_handle_t entry_handle = NULL;
438 twr_t *tower;
439 twr_t *towers[4] = { NULL };
440 unsigned32 num_towers, i;
442 char *resolved_endpoint = NULL;
443
444 TRACE("(%p,%p)\n", Binding, IfSpec);
445 TRACE(" protseq=%s\n", debugstr_a(bind->Protseq));
446 TRACE(" obj=%s\n", debugstr_guid(&bind->ObjectUuid));
447 TRACE(" networkaddr=%s\n", debugstr_a(bind->NetworkAddr));
448 TRACE(" ifid=%s\n", debugstr_guid(&If->InterfaceId.SyntaxGUID));
449
450 /* just return for fully bound handles */
451 if (bind->Endpoint && (bind->Endpoint[0] != '\0'))
452 return RPC_S_OK;
453
455 if (status != RPC_S_OK) return status;
456
457 status = TowerConstruct(&If->InterfaceId, &If->TransferSyntax, bind->Protseq,
458 ((RpcBinding *)handle)->Endpoint,
459 bind->NetworkAddr, &tower);
460 if (status != RPC_S_OK)
461 {
462 WARN("couldn't get tower\n");
464 return status;
465 }
466
467 while (TRUE)
468 {
469 __TRY
470 {
471 ept_map(handle, &uuid, tower, &entry_handle, ARRAY_SIZE(towers), &num_towers, towers, &status2);
472 /* FIXME: translate status2? */
473 }
475 {
476 status2 = GetExceptionCode();
477 }
479 if (status2 == RPC_S_SERVER_UNAVAILABLE &&
481 {
482 if (start_rpcss())
483 continue;
484 }
485 break;
486 };
487
489 I_RpcFree(tower);
490
491 if (status2 != RPC_S_OK)
492 {
493 ERR("ept_map failed for ifid %s, protseq %s, networkaddr %s\n", debugstr_guid(&If->TransferSyntax.SyntaxGUID), bind->Protseq, bind->NetworkAddr);
494 return status2;
495 }
496
497 for (i = 0; i < num_towers; i++)
498 {
499 /* only parse the tower if we haven't already found a suitable
500 * endpoint, otherwise just free the tower */
501 if (!resolved_endpoint)
502 {
503 status = TowerExplode(towers[i], NULL, NULL, NULL, &resolved_endpoint, NULL);
504 TRACE("status = %ld\n", status);
505 }
506 I_RpcFree(towers[i]);
507 }
508
509 if (resolved_endpoint)
510 {
511 RPCRT4_ResolveBinding(Binding, resolved_endpoint);
512 I_RpcFree(resolved_endpoint);
513 return RPC_S_OK;
514 }
515
516 WARN("couldn't find an endpoint\n");
518}
519
520/*****************************************************************************
521 * TowerExplode (RPCRT4.@)
522 */
524 const twr_t *tower, PRPC_SYNTAX_IDENTIFIER object, PRPC_SYNTAX_IDENTIFIER syntax,
525 char **protseq, char **endpoint, char **address)
526{
527 size_t tower_size;
529 const unsigned char *p;
530 u_int16 floor_count;
531 const twr_uuid_floor_t *object_floor;
532 const twr_uuid_floor_t *syntax_floor;
533
534 TRACE("(%p, %p, %p, %p, %p, %p)\n", tower, object, syntax, protseq,
536
537 if (protseq)
538 *protseq = NULL;
539 if (endpoint)
540 *endpoint = NULL;
541 if (address)
542 *address = NULL;
543
544 tower_size = tower->tower_length;
545
546 if (tower_size < sizeof(u_int16))
548
549 p = &tower->tower_octet_string[0];
550
551 floor_count = *(const u_int16 *)p;
552 p += sizeof(u_int16);
553 tower_size -= sizeof(u_int16);
554 TRACE("floor_count: %d\n", floor_count);
555 /* FIXME: should we do something with the floor count? at the moment we don't */
556
557 if (tower_size < sizeof(*object_floor) + sizeof(*syntax_floor))
559
560 object_floor = (const twr_uuid_floor_t *)p;
561 p += sizeof(*object_floor);
562 tower_size -= sizeof(*object_floor);
563 syntax_floor = (const twr_uuid_floor_t *)p;
564 p += sizeof(*syntax_floor);
565 tower_size -= sizeof(*syntax_floor);
566
567 if ((object_floor->count_lhs != sizeof(object_floor->protid) +
568 sizeof(object_floor->uuid) + sizeof(object_floor->major_version)) ||
569 (object_floor->protid != EPM_PROTOCOL_UUID) ||
570 (object_floor->count_rhs != sizeof(object_floor->minor_version)))
572
573 if ((syntax_floor->count_lhs != sizeof(syntax_floor->protid) +
574 sizeof(syntax_floor->uuid) + sizeof(syntax_floor->major_version)) ||
575 (syntax_floor->protid != EPM_PROTOCOL_UUID) ||
576 (syntax_floor->count_rhs != sizeof(syntax_floor->minor_version)))
578
579 status = RpcTransport_ParseTopOfTower(p, tower_size, protseq, address, endpoint);
580 if ((status == RPC_S_OK) && syntax && object)
581 {
582 syntax->SyntaxGUID = syntax_floor->uuid;
583 syntax->SyntaxVersion.MajorVersion = syntax_floor->major_version;
584 syntax->SyntaxVersion.MinorVersion = syntax_floor->minor_version;
585 object->SyntaxGUID = object_floor->uuid;
586 object->SyntaxVersion.MajorVersion = object_floor->major_version;
587 object->SyntaxVersion.MinorVersion = object_floor->minor_version;
588 }
589 return status;
590}
591
592/***********************************************************************
593 * TowerConstruct (RPCRT4.@)
594 */
596 const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax,
597 const char *protseq, const char *endpoint, const char *address,
598 twr_t **tower)
599{
600 size_t tower_size;
602 unsigned char *p;
603 twr_uuid_floor_t *object_floor;
604 twr_uuid_floor_t *syntax_floor;
605
606 TRACE("(%p, %p, %s, %s, %s, %p)\n", object, syntax, debugstr_a(protseq),
608
609 *tower = NULL;
610
611 status = RpcTransport_GetTopOfTower(NULL, &tower_size, protseq, address, endpoint);
612
613 if (status != RPC_S_OK)
614 return status;
615
616 tower_size += sizeof(u_int16) + sizeof(*object_floor) + sizeof(*syntax_floor);
617 *tower = I_RpcAllocate(FIELD_OFFSET(twr_t, tower_octet_string[tower_size]));
618 if (!*tower)
620
621 (*tower)->tower_length = tower_size;
622 p = &(*tower)->tower_octet_string[0];
623 *(u_int16 *)p = 5; /* number of floors */
624 p += sizeof(u_int16);
625 object_floor = (twr_uuid_floor_t *)p;
626 p += sizeof(*object_floor);
627 syntax_floor = (twr_uuid_floor_t *)p;
628 p += sizeof(*syntax_floor);
629
630 object_floor->count_lhs = sizeof(object_floor->protid) + sizeof(object_floor->uuid) +
631 sizeof(object_floor->major_version);
632 object_floor->protid = EPM_PROTOCOL_UUID;
633 object_floor->count_rhs = sizeof(object_floor->minor_version);
634 object_floor->uuid = object->SyntaxGUID;
635 object_floor->major_version = object->SyntaxVersion.MajorVersion;
636 object_floor->minor_version = object->SyntaxVersion.MinorVersion;
637
638 syntax_floor->count_lhs = sizeof(syntax_floor->protid) + sizeof(syntax_floor->uuid) +
639 sizeof(syntax_floor->major_version);
640 syntax_floor->protid = EPM_PROTOCOL_UUID;
641 syntax_floor->count_rhs = sizeof(syntax_floor->minor_version);
642 syntax_floor->uuid = syntax->SyntaxGUID;
643 syntax_floor->major_version = syntax->SyntaxVersion.MajorVersion;
644 syntax_floor->minor_version = syntax->SyntaxVersion.MinorVersion;
645
646 status = RpcTransport_GetTopOfTower(p, &tower_size, protseq, address, endpoint);
647 if (status != RPC_S_OK)
648 {
649 I_RpcFree(*tower);
650 *tower = NULL;
651 return status;
652 }
653 return RPC_S_OK;
654}
655
657{
658 return malloc(len);
659}
660
662{
663 free(ptr);
664}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
unsigned long error_status_t
Definition: basetyps.h:83
unsigned short u_int16
Definition: dcetypes.idl:33
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define annotation(x)
Definition: dispex.idl:19
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define __TRY
Definition: compat.h:80
#define __ENDTRY
Definition: compat.h:82
ULONGLONG WINAPI DECLSPEC_HOTPATCH GetTickCount64(void)
Definition: sync.c:192
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
#define EPM_PROTOCOL_UUID
Definition: epm_towers.h:33
void __cdecl ept_insert(handle_t h, unsigned32 num_ents, ept_entry_t entries[], boolean32 replace, error_status_t *status)
Definition: epmp.c:92
void __cdecl ept_map(handle_t h, uuid_p_t object, twr_p_t map_tower, ept_lookup_handle_t *entry_handle, unsigned32 max_towers, unsigned32 *num_towers, twr_p_t *towers, error_status_t *status)
Definition: epmp.c:201
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint address
Definition: glext.h:9393
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
Definition: glfuncs.h:248
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 GLint GLint j
Definition: glfuncs.h:250
#define GetExceptionCode
Definition: excpt.h:83
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define EXCEPTION_CONTINUE_SEARCH
Definition: excpt.h:91
Definition: msctf.idl:532
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
#define GUID_NULL
Definition: ks.h:106
#define EXCEPTION_ILLEGAL_INSTRUCTION
Definition: minwinbase.h:60
#define EXCEPTION_ACCESS_VIOLATION
Definition: minwinbase.h:44
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
unsigned int unsigned32
Definition: rpc.c:47
#define min(a, b)
Definition: monoChain.cc:55
long LONG
Definition: pedump.c:60
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
Definition: replace.c:38
#define calloc
Definition: rosglue.h:14
LPSTR RPCRT4_strdupWtoA(LPCWSTR src)
Definition: rpc_binding.c:46
RPC_STATUS RPCRT4_ResolveBinding(RpcBinding *Binding, LPCSTR Endpoint)
Definition: rpc_binding.c:187
RPC_STATUS WINAPI RpcBindingFree(RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:769
ULONG RpcAuthInfo_Release(RpcAuthInfo *AuthInfo)
Definition: rpc_binding.c:1170
RPC_STATUS RPC_ENTRY RpcBindingCopy(RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE *DestinationBinding)
Definition: rpc_binding.c:971
RPC_STATUS WINAPI RpcBindingFromStringBindingA(RPC_CSTR StringBinding, RPC_BINDING_HANDLE *Binding)
Definition: rpc_binding.c:822
RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data, size_t tower_size, char **protseq, char **networkaddr, char **endpoint)
RPC_STATUS RpcTransport_GetTopOfTower(unsigned char *tower_data, size_t *tower_size, const char *protseq, const char *networkaddr, const char *endpoint)
RPC_STATUS WINAPI RpcEpUnregister(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector)
Definition: rpc_epmap.c:343
static RPC_STATUS get_epm_handle_server(RPC_BINDING_HANDLE *epm_handle)
Definition: rpc_epmap.c:176
RPC_STATUS WINAPI RpcEpRegisterNoReplaceW(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_WSTR Annotation)
Definition: rpc_epmap.c:328
RPC_STATUS WINAPI TowerExplode(const twr_t *tower, PRPC_SYNTAX_IDENTIFIER object, PRPC_SYNTAX_IDENTIFIER syntax, char **protseq, char **endpoint, char **address)
Definition: rpc_epmap.c:523
RPC_STATUS WINAPI RpcEpRegisterNoReplaceA(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_CSTR Annotation)
Definition: rpc_epmap.c:304
static RPC_STATUS get_epm_handle_client(RPC_BINDING_HANDLE handle, RPC_BINDING_HANDLE *epm_handle)
Definition: rpc_epmap.c:139
void __RPC_USER MIDL_user_free(void __RPC_FAR *ptr)
Definition: rpc_epmap.c:661
RPC_STATUS WINAPI TowerConstruct(const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax, const char *protseq, const char *endpoint, const char *address, twr_t **tower)
Definition: rpc_epmap.c:595
static RPC_STATUS epm_register(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_CSTR Annotation, BOOL replace)
Definition: rpc_epmap.c:195
RPC_STATUS WINAPI RpcEpResolveBinding(RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec)
Definition: rpc_epmap.c:430
RPC_STATUS WINAPI RpcEpRegisterW(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_WSTR Annotation)
Definition: rpc_epmap.c:313
static BOOL is_epm_destination_local(RPC_BINDING_HANDLE handle)
Definition: rpc_epmap.c:128
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
Definition: rpc_epmap.c:183
RPC_STATUS WINAPI RpcEpRegisterA(RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector, UUID_VECTOR *UuidVector, RPC_CSTR Annotation)
Definition: rpc_epmap.c:295
void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T len)
Definition: rpc_epmap.c:656
static BOOL start_rpcss(void)
Definition: rpc_epmap.c:79
unsigned short * RPC_WSTR
Definition: rpcdce.h:46
unsigned char * RPC_CSTR
Definition: rpcdce.h:45
#define RPC_S_OUT_OF_MEMORY
Definition: rpcnterr.h:24
#define RPC_S_OK
Definition: rpcnterr.h:22
void WINAPI I_RpcFree(void *Object)
Definition: rpcrt4_main.c:755
void *WINAPI I_RpcAllocate(unsigned int Size)
Definition: rpcrt4_main.c:747
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
Definition: scm.c:2107
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
Definition: scm.c:2926
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
Definition: scm.c:2199
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
Definition: scm.c:3019
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
Definition: scm.c:580
#define __RPC_FAR
Definition: rpc.h:52
long RPC_STATUS
Definition: rpc.h:48
#define __RPC_USER
Definition: rpc.h:61
#define memset(x, y, z)
Definition: compat.h:39
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
Definition: socklife.c:36
#define TRACE(s)
Definition: solgame.cpp:4
PEXCEPTION_RECORD ExceptionRecord
Definition: rtltypes.h:200
DWORD ExceptionCode
Definition: compat.h:208
RPC_BINDING_HANDLE BindingH[1]
Definition: rpcdce.h:58
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:117
RPC_SYNTAX_IDENTIFIER TransferSyntax
Definition: rpcdcep.h:118
RPC_SYNTAX_IDENTIFIER InterfaceId
Definition: rpcdcep.h:104
RPC_SYNTAX_IDENTIFIER TransferSyntax
Definition: rpcdcep.h:105
RPC_VERSION SyntaxVersion
Definition: rpcdcep.h:33
unsigned short MajorVersion
Definition: rpcdcep.h:27
unsigned short MinorVersion
Definition: rpcdcep.h:28
RpcAuthInfo * AuthInfo
Definition: rpc_binding.h:141
UUID * Uuid[1]
Definition: rpcdce.h:65
ULONG Count
Definition: rpcdce.h:64
Definition: nis.h:10
const char * endpoint
Definition: rpc_epmap.c:69
const char * protseq
Definition: rpc_epmap.c:68
Definition: ps.c:97
Definition: rpc.c:49
byte tower_octet_string[1]
Definition: rpc.c:51
unsigned32 tower_length
Definition: rpc.c:50
u_int16 minor_version
Definition: epm_towers.h:60
u_int16 count_lhs
Definition: epm_towers.h:55
u_int16 count_rhs
Definition: epm_towers.h:59
u_int16 major_version
Definition: epm_towers.h:58
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define WINAPI
Definition: msvc.h:6
#define __EXCEPT(func)
Definition: exception.h:62
#define RPC_S_PROTSEQ_NOT_SUPPORTED
Definition: winerror.h:1370
#define RPC_S_OUT_OF_RESOURCES
Definition: winerror.h:1388
#define ERROR_SERVICE_ALREADY_RUNNING
Definition: winerror.h:931
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1418
#define RPC_S_SERVER_UNAVAILABLE
Definition: winerror.h:1389
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1369
#define SERVICE_START
Definition: winsvc.h:63
#define SERVICE_QUERY_STATUS
Definition: winsvc.h:61
@ SC_STATUS_PROCESS_INFO
Definition: winsvc.h:125
#define SERVICE_START_PENDING
Definition: winsvc.h:22
#define SERVICE_RUNNING
Definition: winsvc.h:24
char * LPSTR
Definition: xmlstorage.h:182
unsigned char BYTE
Definition: xxhash.c:193