ReactOS 0.4.16-dev-1946-g52006dd
rpcrt4_main.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ntstatus.h"
#include "windef.h"
#include "winerror.h"
#include "winbase.h"
#include "winuser.h"
#include "winnt.h"
#include "wine/winternl.h"
#include "ntsecapi.h"
#include "iptypes.h"
#include "iphlpapi.h"
#include "rpc.h"
#include "ole2.h"
#include "rpcndr.h"
#include "rpcproxy.h"
#include "rpc_binding.h"
#include "rpc_server.h"
#include "wine/debug.h"
Include dependency graph for rpcrt4_main.c:

Go to the source code of this file.

Classes

struct  context_handle_list
 
struct  threaddata
 
struct  interface_header
 

Macros

#define WIN32_NO_STATUS
 
#define TICKS_PER_CLOCK_TICK   1000
 
#define SECSPERDAY   86400
 
#define TICKSPERSEC   10000000
 
#define SECS_15_OCT_1582_TO_1601   ((17 + 30 + 31 + 365 * 18 + 5) * SECSPERDAY)
 
#define TICKS_15_OCT_1582_TO_1601   ((ULONGLONG)SECS_15_OCT_1582_TO_1601 * TICKSPERSEC)
 
#define ADDRESS_BYTES_NEEDED   6
 
#define MAX_RPC_ERROR_TEXT   256
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (rpc)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
RPC_STATUS WINAPI RpcStringFreeA (RPC_CSTR *String)
 
RPC_STATUS WINAPI RpcStringFreeW (RPC_WSTR *String)
 
RPC_STATUS WINAPI RpcIfInqId (RPC_IF_HANDLE if_handle, RPC_IF_ID *if_id)
 
void DECLSPEC_NORETURN WINAPI RpcRaiseException (RPC_STATUS exception)
 
int WINAPI UuidCompare (UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
 
int WINAPI UuidEqual (UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
 
int WINAPI UuidIsNil (UUID *Uuid, RPC_STATUS *Status)
 
RPC_STATUS WINAPI UuidCreateNil (UUID *Uuid)
 
RPC_STATUS WINAPI UuidCreate (UUID *Uuid)
 
static void RPC_UuidGetSystemTime (ULONGLONG *time)
 
static RPC_STATUS RPC_UuidGetNodeAddress (BYTE *address)
 
RPC_STATUS WINAPI UuidCreateSequential (UUID *Uuid)
 
RPC_STATUS WINAPI I_UuidCreate (UUID *Uuid)
 
unsigned short WINAPI UuidHash (UUID *uuid, RPC_STATUS *Status)
 
RPC_STATUS WINAPI UuidToStringA (UUID *Uuid, RPC_CSTR *StringUuid)
 
RPC_STATUS WINAPI UuidToStringW (UUID *Uuid, RPC_WSTR *StringUuid)
 
RPC_STATUS WINAPI UuidFromStringA (RPC_CSTR s, UUID *uuid)
 
RPC_STATUS WINAPI UuidFromStringW (RPC_WSTR s, UUID *uuid)
 
RPC_STATUS RPC_ENTRY DceErrorInqTextW (RPC_STATUS e, RPC_WSTR buffer)
 
RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, RPC_CSTR buffer)
 
void *WINAPI I_RpcAllocate (unsigned int Size)
 
void WINAPI I_RpcFree (void *Object)
 
LONG WINAPI I_RpcMapWin32Status (RPC_STATUS status)
 
int WINAPI RpcExceptionFilter (ULONG ExceptionCode)
 
RPC_STATUS RPC_ENTRY RpcErrorStartEnumeration (RPC_ERROR_ENUM_HANDLE *EnumHandle)
 
RPC_STATUS RPC_ENTRY RpcErrorEndEnumeration (RPC_ERROR_ENUM_HANDLE *EnumHandle)
 
RPC_STATUS RPC_ENTRY RpcErrorSaveErrorInfo (RPC_ERROR_ENUM_HANDLE *EnumHandle, void **ErrorBlob, SIZE_T *BlobSize)
 
RPC_STATUS RPC_ENTRY RpcErrorLoadErrorInfo (void *ErrorBlob, SIZE_T BlobSize, RPC_ERROR_ENUM_HANDLE *EnumHandle)
 
RPC_STATUS RPC_ENTRY RpcErrorGetNextRecord (RPC_ERROR_ENUM_HANDLE *EnumHandle, BOOL CopyStrings, RPC_EXTENDED_ERROR_INFO *ErrorInfo)
 
RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout (LONG Timeout)
 
static struct threaddataget_or_create_threaddata (void)
 
void RPCRT4_SetThreadCurrentConnection (RpcConnection *Connection)
 
void RPCRT4_SetThreadCurrentCallHandle (RpcBinding *Binding)
 
RpcBindingRPCRT4_GetThreadCurrentCallHandle (void)
 
void RPCRT4_PushThreadContextHandle (NDR_SCONTEXT SContext)
 
void RPCRT4_RemoveThreadContextHandle (NDR_SCONTEXT SContext)
 
NDR_SCONTEXT RPCRT4_PopThreadContextHandle (void)
 
static RPC_STATUS rpc_cancel_thread (DWORD target_tid)
 
RPC_STATUS RPC_ENTRY RpcCancelThread (void *ThreadHandle)
 
RPC_STATUS RPC_ENTRY RpcCancelThreadEx (void *ThreadHandle, LONG Timeout)
 

Variables

static UUID uuid_nil
 
static CRITICAL_SECTION uuid_cs = { &critsect_debug, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG critsect_debug
 
static CRITICAL_SECTION threaddata_cs = { &threaddata_cs_debug, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG threaddata_cs_debug
 
static struct list threaddata_list = LIST_INIT(threaddata_list)
 
static const BYTE hex2bin []
 

Macro Definition Documentation

◆ ADDRESS_BYTES_NEEDED

#define ADDRESS_BYTES_NEEDED   6

Definition at line 367 of file rpcrt4_main.c.

◆ MAX_RPC_ERROR_TEXT

#define MAX_RPC_ERROR_TEXT   256

Definition at line 691 of file rpcrt4_main.c.

◆ SECS_15_OCT_1582_TO_1601

#define SECS_15_OCT_1582_TO_1601   ((17 + 30 + 31 + 365 * 18 + 5) * SECSPERDAY)

Definition at line 353 of file rpcrt4_main.c.

◆ SECSPERDAY

#define SECSPERDAY   86400

Definition at line 350 of file rpcrt4_main.c.

◆ TICKS_15_OCT_1582_TO_1601

#define TICKS_15_OCT_1582_TO_1601   ((ULONGLONG)SECS_15_OCT_1582_TO_1601 * TICKSPERSEC)

Definition at line 354 of file rpcrt4_main.c.

◆ TICKS_PER_CLOCK_TICK

#define TICKS_PER_CLOCK_TICK   1000

Definition at line 349 of file rpcrt4_main.c.

◆ TICKSPERSEC

#define TICKSPERSEC   10000000

Definition at line 351 of file rpcrt4_main.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 37 of file rpcrt4_main.c.

Function Documentation

◆ DceErrorInqTextA()

RPC_STATUS RPC_ENTRY DceErrorInqTextA ( RPC_STATUS  e,
RPC_CSTR  buffer 
)

Definition at line 728 of file rpcrt4_main.c.

729{
731 WCHAR bufferW [MAX_RPC_ERROR_TEXT];
732 if ((status = DceErrorInqTextW (e, bufferW)) == RPC_S_OK)
733 {
735 NULL, NULL))
736 {
737 ERR ("Failed to translate error\n");
739 }
740 }
741 return status;
742}
#define ERR(fmt,...)
Definition: precomp.h:57
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
GLuint buffer
Definition: glext.h:5915
#define e
Definition: ke_i.h:82
#define RPC_S_INVALID_ARG
Definition: rpcnterr.h:23
#define RPC_S_OK
Definition: rpcnterr.h:22
RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS e, RPC_WSTR buffer)
Definition: rpcrt4_main.c:705
#define MAX_RPC_ERROR_TEXT
Definition: rpcrt4_main.c:691
long RPC_STATUS
Definition: rpc.h:48
Definition: ps.c:97
__wchar_t WCHAR
Definition: xmlstorage.h:180
char * LPSTR
Definition: xmlstorage.h:182

Referenced by test_DceErrorInqTextA().

◆ DceErrorInqTextW()

RPC_STATUS RPC_ENTRY DceErrorInqTextW ( RPC_STATUS  e,
RPC_WSTR  buffer 
)

Definition at line 705 of file rpcrt4_main.c.

706{
707 DWORD count;
711 if (!count)
712 {
716 if (!count)
717 {
718 ERR ("Failed to translate error\n");
719 return RPC_S_INVALID_ARG;
720 }
721 }
722 return RPC_S_OK;
723}
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FORMAT_MESSAGE_IGNORE_INSERTS
Definition: winbase.h:397
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:400
#define RPC_S_NOT_RPC_ERROR
Definition: winerror.h:1487

Referenced by DceErrorInqTextA().

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 117 of file rpcrt4_main.c.

118{
119 struct threaddata *tdata;
120
121 switch (fdwReason) {
123 break;
124
126 tdata = NtCurrentTeb()->ReservedForNtRpc;
127 if (tdata)
128 {
130 list_remove(&tdata->entry);
132
133 tdata->cs.DebugInfo->Spare[0] = 0;
134 DeleteCriticalSection(&tdata->cs);
135 if (tdata->connection)
136 ERR("tdata->connection should be NULL but is still set to %p\n", tdata->connection);
137 if (tdata->server_binding)
138 ERR("tdata->server_binding should be NULL but is still set to %p\n", tdata->server_binding);
139 free(tdata);
140 }
141 break;
142
144 if (lpvReserved) break; /* do nothing if process is shutting down */
149 break;
150 }
151
152 return TRUE;
153}
static DWORD const fdwReason
static void list_remove(struct list_entry *entry)
Definition: list.h:90
#define free
Definition: debug_ros.c:5
#define TRUE
Definition: types.h:120
#define DLL_THREAD_DETACH
Definition: compat.h:133
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define NtCurrentTeb
static IN DWORD IN LPVOID lpvReserved
void RPCRT4_destroy_all_protseqs(void)
Definition: rpc_server.c:1094
void RPCRT4_ServerFreeAllRegisteredAuthInfo(void)
Definition: rpc_server.c:1396
static CRITICAL_SECTION uuid_cs
Definition: rpcrt4_main.c:62
static CRITICAL_SECTION threaddata_cs
Definition: rpcrt4_main.c:71
PRTL_CRITICAL_SECTION_DEBUG DebugInfo
Definition: rtltypes.h:1450
RpcBinding * server_binding
Definition: rpcrt4_main.c:94
struct list entry
Definition: rpcrt4_main.c:90
RpcConnection * connection
Definition: rpcrt4_main.c:93
CRITICAL_SECTION cs
Definition: rpcrt4_main.c:91
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

◆ get_or_create_threaddata()

static struct threaddata * get_or_create_threaddata ( void  )
static

Definition at line 963 of file rpcrt4_main.c.

964{
965 struct threaddata *tdata = NtCurrentTeb()->ReservedForNtRpc;
966 if (!tdata)
967 {
968 tdata = calloc(1, sizeof(*tdata));
969 if (!tdata) return NULL;
970
972 tdata->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": threaddata.cs");
973 tdata->thread_id = GetCurrentThreadId();
974
978
979 NtCurrentTeb()->ReservedForNtRpc = tdata;
980 return tdata;
981 }
982 return tdata;
983}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
#define calloc
Definition: rosglue.h:14
static struct list threaddata_list
Definition: rpcrt4_main.c:80
DWORD thread_id
Definition: rpcrt4_main.c:92
#define DWORD_PTR
Definition: treelist.c:76
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1138

Referenced by RPCRT4_GetThreadCurrentCallHandle(), RPCRT4_PopThreadContextHandle(), RPCRT4_PushThreadContextHandle(), RPCRT4_RemoveThreadContextHandle(), RPCRT4_SetThreadCurrentCallHandle(), and RPCRT4_SetThreadCurrentConnection().

◆ I_RpcAllocate()

void *WINAPI I_RpcAllocate ( unsigned int  Size)

Definition at line 747 of file rpcrt4_main.c.

748{
749 return malloc(Size);
750}
#define malloc
Definition: debug_ros.c:4
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539

Referenced by do_ndr_async_client_call(), I_RpcGetBuffer(), ncacn_pipe_name(), ncalrpc_pipe_name(), NdrAsyncServerCall(), rpcrt4_ip_tcp_parse_top_of_tower(), rpcrt4_ncacn_np_parse_top_of_tower(), rpcrt4_ncalrpc_parse_top_of_tower(), RPCRT4_ReceiveWithAuth(), RpcTransport_ParseTopOfTower(), and TowerConstruct().

◆ I_RpcFree()

◆ I_RpcMapWin32Status()

LONG WINAPI I_RpcMapWin32Status ( RPC_STATUS  status)

Definition at line 771 of file rpcrt4_main.c.

772{
773 TRACE("(%ld)\n", status);
774 switch (status)
775 {
882 default: return status;
883 }
884}
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
#define STATUS_ACCESS_VIOLATION
#define RPC_NT_INVALID_NAF_ID
Definition: ntstatus.h:1593
#define EPT_NT_INVALID_ENTRY
Definition: ntstatus.h:1581
#define RPC_NT_SERVER_UNAVAILABLE
Definition: ntstatus.h:1555
#define RPC_NT_UNSUPPORTED_TYPE
Definition: ntstatus.h:1563
#define STATUS_WRONG_PASSWORD
Definition: ntstatus.h:436
#define RPC_NT_INTERFACE_NOT_FOUND
Definition: ntstatus.h:1589
#define RPC_NT_INVALID_NETWORK_OPTIONS
Definition: ntstatus.h:1557
#define RPC_NT_INVALID_RPC_PROTSEQ
Definition: ntstatus.h:1537
#define RPC_NT_BAD_STUB_DATA
Definition: ntstatus.h:1632
#define STATUS_INVALID_LOGON_HOURS
Definition: ntstatus.h:441
#define RPC_NT_INTERNAL_ERROR
Definition: ntstatus.h:1596
#define RPC_NT_UNKNOWN_AUTHN_LEVEL
Definition: ntstatus.h:1578
#define RPC_NT_SS_IN_NULL_CONTEXT
Definition: ntstatus.h:1624
#define RPC_NT_ENUM_VALUE_OUT_OF_RANGE
Definition: ntstatus.h:1630
#define RPC_NT_PIPE_CLOSED
Definition: ntstatus.h:1639
#define RPC_NT_ENTRY_ALREADY_EXISTS
Definition: ntstatus.h:1590
#define RPC_NT_DUPLICATE_ENDPOINT
Definition: ntstatus.h:1570
#define RPC_NT_CALL_IN_PROGRESS
Definition: ntstatus.h:1602
#define RPC_NT_NO_CALL_ACTIVE
Definition: ntstatus.h:1558
#define RPC_NT_NO_ENDPOINT_FOUND
Definition: ntstatus.h:1541
#define RPC_NT_STRING_TOO_LONG
Definition: ntstatus.h:1573
#define RPC_NT_PROCNUM_OUT_OF_RANGE
Definition: ntstatus.h:1575
#define STATUS_ACCOUNT_DISABLED
Definition: ntstatus.h:444
#define RPC_NT_PIPE_EMPTY
Definition: ntstatus.h:1641
#define RPC_NT_NO_MORE_ENTRIES
Definition: ntstatus.h:1621
#define STATUS_PASSWORD_MUST_CHANGE
Definition: ntstatus.h:802
#define RPC_NT_BYTE_COUNT_TOO_SMALL
Definition: ntstatus.h:1631
#define RPC_NT_SS_CONTEXT_MISMATCH
Definition: ntstatus.h:1625
#define RPC_NT_WRONG_KIND_OF_BINDING
Definition: ntstatus.h:1534
#define RPC_NT_ALREADY_REGISTERED
Definition: ntstatus.h:1544
#define EPT_NT_NOT_REGISTERED
Definition: ntstatus.h:1583
#define RPC_NT_INVALID_ASYNC_HANDLE
Definition: ntstatus.h:1616
#define RPC_NT_INVALID_NAME_SYNTAX
Definition: ntstatus.h:1567
#define RPC_NT_NOTHING_TO_EXPORT
Definition: ntstatus.h:1584
#define RPC_NT_UNKNOWN_IF
Definition: ntstatus.h:1550
#define RPC_NT_PROTOCOL_ERROR
Definition: ntstatus.h:1561
#define RPC_NT_ENTRY_NOT_FOUND
Definition: ntstatus.h:1591
#define RPC_NT_NO_PROTSEQS_REGISTERED
Definition: ntstatus.h:1547
#define RPC_NT_NULL_REF_POINTER
Definition: ntstatus.h:1629
#define RPC_NT_GROUP_MEMBER_NOT_FOUND
Definition: ntstatus.h:1604
#define RPC_NT_SS_CHAR_TRANS_OPEN_FAIL
Definition: ntstatus.h:1622
#define RPC_NT_UNSUPPORTED_TRANS_SYN
Definition: ntstatus.h:1562
#define RPC_NT_INVALID_STRING_UUID
Definition: ntstatus.h:1538
#define RPC_NT_NOT_LISTENING
Definition: ntstatus.h:1548
#define RPC_NT_OBJECT_NOT_FOUND
Definition: ntstatus.h:1543
#define STATUS_INSUFF_SERVER_RESOURCES
Definition: ntstatus.h:771
#define RPC_NT_INVALID_AUTH_IDENTITY
Definition: ntstatus.h:1579
#define RPC_NT_INVALID_ASYNC_CALL
Definition: ntstatus.h:1617
#define RPC_NT_SS_CHAR_TRANS_SHORT_FILE
Definition: ntstatus.h:1623
#define RPC_NT_PROTSEQ_NOT_FOUND
Definition: ntstatus.h:1574
#define RPC_NT_SS_CANNOT_GET_CALL_HANDLE
Definition: ntstatus.h:1628
#define RPC_NT_NO_ENTRY_NAME
Definition: ntstatus.h:1566
#define RPC_NT_CALL_CANCELLED
Definition: ntstatus.h:1608
#define RPC_NT_TYPE_ALREADY_REGISTERED
Definition: ntstatus.h:1545
#define RPC_NT_UUID_NO_ADDRESS
Definition: ntstatus.h:1569
#define RPC_NT_OUT_OF_RESOURCES
Definition: ntstatus.h:1554
#define STATUS_INVALID_SECURITY_DESCR
Definition: ntstatus.h:451
#define RPC_NT_NO_CONTEXT_AVAILABLE
Definition: ntstatus.h:1595
#define RPC_NT_PIPE_DISCIPLINE_ERROR
Definition: ntstatus.h:1640
#define RPC_NT_MAX_CALLS_TOO_SMALL
Definition: ntstatus.h:1572
#define RPC_NT_INVALID_STRING_BINDING
Definition: ntstatus.h:1533
#define RPC_NT_NO_PROTSEQS
Definition: ntstatus.h:1552
#define RPC_NT_SS_HANDLES_MISMATCH
Definition: ntstatus.h:1627
#define STATUS_PASSWORD_EXPIRED
Definition: ntstatus.h:443
#define RPC_NT_NO_BINDINGS
Definition: ntstatus.h:1551
#define RPC_NT_FP_DIV_ZERO
Definition: ntstatus.h:1599
#define RPC_NT_FP_UNDERFLOW
Definition: ntstatus.h:1600
#define RPC_NT_INCOMPLETE_NAME
Definition: ntstatus.h:1585
#define RPC_NT_SS_CONTEXT_DAMAGED
Definition: ntstatus.h:1626
#define RPC_NT_SERVER_TOO_BUSY
Definition: ntstatus.h:1556
#define RPC_NT_FP_OVERFLOW
Definition: ntstatus.h:1601
#define RPC_NT_UNKNOWN_AUTHN_SERVICE
Definition: ntstatus.h:1577
#define RPC_NT_INVALID_TIMEOUT
Definition: ntstatus.h:1542
#define RPC_NT_CANNOT_SUPPORT
Definition: ntstatus.h:1594
#define RPC_NT_PROTSEQ_NOT_SUPPORTED
Definition: ntstatus.h:1536
#define RPC_NT_INVALID_NET_ADDR
Definition: ntstatus.h:1540
#define RPC_NT_INVALID_BOUND
Definition: ntstatus.h:1565
#define RPC_NT_NO_MORE_BINDINGS
Definition: ntstatus.h:1603
#define RPC_NT_INVALID_OBJECT
Definition: ntstatus.h:1606
#define RPC_NT_ZERO_DIVIDE
Definition: ntstatus.h:1597
#define RPC_NT_UNKNOWN_AUTHZ_SERVICE
Definition: ntstatus.h:1580
#define RPC_NT_BINDING_HAS_NO_AUTH
Definition: ntstatus.h:1576
#define RPC_NT_INVALID_BINDING
Definition: ntstatus.h:1535
#define RPC_NT_UNSUPPORTED_NAME_SYNTAX
Definition: ntstatus.h:1568
#define RPC_NT_UNKNOWN_MGR_TYPE
Definition: ntstatus.h:1549
#define RPC_NT_CANT_CREATE_ENDPOINT
Definition: ntstatus.h:1553
#define STATUS_ACCOUNT_LOCKED_OUT
Definition: ntstatus.h:818
#define RPC_NT_NAME_SERVICE_UNAVAILABLE
Definition: ntstatus.h:1592
#define EPT_NT_CANT_PERFORM_OP
Definition: ntstatus.h:1582
#define RPC_NT_NOT_ALL_OBJS_UNEXPORTED
Definition: ntstatus.h:1588
#define RPC_NT_NO_MORE_MEMBERS
Definition: ntstatus.h:1587
#define RPC_NT_INVALID_ENDPOINT_FORMAT
Definition: ntstatus.h:1539
#define RPC_NT_ALREADY_LISTENING
Definition: ntstatus.h:1546
#define RPC_NT_UNKNOWN_AUTHN_TYPE
Definition: ntstatus.h:1571
#define EPT_NT_CANT_CREATE
Definition: ntstatus.h:1605
#define RPC_NT_ADDRESS_ERROR
Definition: ntstatus.h:1598
#define RPC_NT_CALL_FAILED
Definition: ntstatus.h:1559
#define RPC_NT_CALL_FAILED_DNE
Definition: ntstatus.h:1560
#define RPC_NT_INVALID_TAG
Definition: ntstatus.h:1564
#define RPC_NT_INVALID_VERS_OPTION
Definition: ntstatus.h:1586
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define TRACE(s)
Definition: solgame.cpp:4
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define RPC_S_SERVER_TOO_BUSY
Definition: winerror.h:1390
#define EPT_S_INVALID_ENTRY
Definition: winerror.h:1416
#define RPC_S_PROTSEQ_NOT_SUPPORTED
Definition: winerror.h:1370
#define RPC_S_TYPE_ALREADY_REGISTERED
Definition: winerror.h:1379
#define RPC_S_NOTHING_TO_EXPORT
Definition: winerror.h:1419
#define RPC_S_NO_MORE_MEMBERS
Definition: winerror.h:1422
#define ERROR_INVALID_SECURITY_DESCR
Definition: winerror.h:1165
#define RPC_S_CALL_IN_PROGRESS
Definition: winerror.h:1455
#define RPC_S_OUT_OF_RESOURCES
Definition: winerror.h:1388
#define RPC_S_CALL_FAILED_DNE
Definition: winerror.h:1394
#define RPC_S_ADDRESS_ERROR
Definition: winerror.h:1433
#define RPC_S_INVALID_NAME_SYNTAX
Definition: winerror.h:1402
#define RPC_X_SS_HANDLES_MISMATCH
Definition: winerror.h:1442
#define ERROR_INVALID_LOGON_HOURS
Definition: winerror.h:1155
#define EPT_S_NOT_REGISTERED
Definition: winerror.h:1418
#define RPC_S_UNSUPPORTED_TRANS_SYN
Definition: winerror.h:1397
#define RPC_S_INVALID_BOUND
Definition: winerror.h:1400
#define RPC_S_CALL_FAILED
Definition: winerror.h:1393
#define RPC_S_WRONG_KIND_OF_BINDING
Definition: winerror.h:1368
#define RPC_S_NO_CALL_ACTIVE
Definition: winerror.h:1392
#define RPC_S_INVALID_STRING_BINDING
Definition: winerror.h:1367
#define RPC_S_ENTRY_ALREADY_EXISTS
Definition: winerror.h:1425
#define RPC_S_INVALID_TAG
Definition: winerror.h:1399
#define RPC_S_INVALID_ASYNC_CALL
Definition: winerror.h:1518
#define EPT_S_CANT_PERFORM_OP
Definition: winerror.h:1417
#define RPC_S_NOT_ALL_OBJS_UNEXPORTED
Definition: winerror.h:1423
#define RPC_X_ENUM_VALUE_OUT_OF_RANGE
Definition: winerror.h:1445
#define RPC_S_ALREADY_LISTENING
Definition: winerror.h:1380
#define RPC_X_SS_IN_NULL_CONTEXT
Definition: winerror.h:1440
#define RPC_S_INVALID_AUTH_IDENTITY
Definition: winerror.h:1414
#define RPC_S_FP_DIV_ZERO
Definition: winerror.h:1434
#define RPC_X_PIPE_DISCIPLINE_ERROR
Definition: winerror.h:1520
#define RPC_S_NAME_SERVICE_UNAVAILABLE
Definition: winerror.h:1427
#define RPC_S_UNSUPPORTED_TYPE
Definition: winerror.h:1398
#define RPC_S_UNKNOWN_IF
Definition: winerror.h:1384
#define RPC_X_BAD_STUB_DATA
Definition: winerror.h:1447
#define RPC_S_BINDING_HAS_NO_AUTH
Definition: winerror.h:1411
#define RPC_S_NO_MORE_BINDINGS
Definition: winerror.h:1470
#define RPC_S_OBJECT_NOT_FOUND
Definition: winerror.h:1377
#define RPC_S_CANT_CREATE_ENDPOINT
Definition: winerror.h:1387
#define RPC_S_INVALID_STRING_UUID
Definition: winerror.h:1372
#define RPC_S_CANNOT_SUPPORT
Definition: winerror.h:1429
#define RPC_S_INVALID_ASYNC_HANDLE
Definition: winerror.h:1517
#define RPC_X_SS_CHAR_TRANS_OPEN_FAIL
Definition: winerror.h:1438
#define RPC_S_INVALID_NAF_ID
Definition: winerror.h:1428
#define RPC_S_FP_UNDERFLOW
Definition: winerror.h:1435
#define RPC_S_CALL_CANCELLED
Definition: winerror.h:1482
#define RPC_X_NO_MORE_ENTRIES
Definition: winerror.h:1437
#define RPC_S_PROTOCOL_ERROR
Definition: winerror.h:1395
#define RPC_S_NO_BINDINGS
Definition: winerror.h:1385
#define RPC_X_NULL_REF_POINTER
Definition: winerror.h:1444
#define RPC_S_INVALID_TIMEOUT
Definition: winerror.h:1376
#define RPC_X_PIPE_CLOSED
Definition: winerror.h:1519
#define RPC_S_ZERO_DIVIDE
Definition: winerror.h:1432
#define RPC_S_ENTRY_NOT_FOUND
Definition: winerror.h:1426
#define RPC_X_PIPE_EMPTY
Definition: winerror.h:1521
#define RPC_S_NO_CONTEXT_AVAILABLE
Definition: winerror.h:1430
#define RPC_S_UNKNOWN_AUTHN_TYPE
Definition: winerror.h:1406
#define RPC_S_NO_ENDPOINT_FOUND
Definition: winerror.h:1375
#define EPT_S_CANT_CREATE
Definition: winerror.h:1502
#define RPC_S_GROUP_MEMBER_NOT_FOUND
Definition: winerror.h:1501
#define ERROR_ACCOUNT_LOCKED_OUT
Definition: winerror.h:1512
#define RPC_S_UNKNOWN_AUTHN_LEVEL
Definition: winerror.h:1413
#define RPC_S_INVALID_VERS_OPTION
Definition: winerror.h:1421
#define RPC_S_NOT_LISTENING
Definition: winerror.h:1382
#define RPC_S_UNSUPPORTED_NAME_SYNTAX
Definition: winerror.h:1403
#define ERROR_ACCOUNT_DISABLED
Definition: winerror.h:1158
#define RPC_S_UNKNOWN_AUTHN_SERVICE
Definition: winerror.h:1412
#define RPC_X_SS_CANNOT_GET_CALL_HANDLE
Definition: winerror.h:1443
#define RPC_X_BYTE_COUNT_TOO_SMALL
Definition: winerror.h:1446
#define ERROR_WRONG_PASSWORD
Definition: winerror.h:1150
#define ERROR_PASSWORD_MUST_CHANGE
Definition: winerror.h:1510
#define RPC_S_INCOMPLETE_NAME
Definition: winerror.h:1420
#define RPC_S_NO_PROTSEQS
Definition: winerror.h:1386
#define RPC_S_PROTSEQ_NOT_FOUND
Definition: winerror.h:1409
#define ERROR_MAX_THRDS_REACHED
Definition: winerror.h:357
#define RPC_S_STRING_TOO_LONG
Definition: winerror.h:1408
#define RPC_S_INTERNAL_ERROR
Definition: winerror.h:1431
#define RPC_S_SERVER_UNAVAILABLE
Definition: winerror.h:1389
#define RPC_X_SS_CONTEXT_DAMAGED
Definition: winerror.h:1441
#define RPC_S_INVALID_NETWORK_OPTIONS
Definition: winerror.h:1391
#define ERROR_PASSWORD_EXPIRED
Definition: winerror.h:1157
#define RPC_S_ALREADY_REGISTERED
Definition: winerror.h:1378
#define RPC_S_INVALID_NET_ADDR
Definition: winerror.h:1374
#define RPC_S_INTERFACE_NOT_FOUND
Definition: winerror.h:1424
#define RPC_S_INVALID_ENDPOINT_FORMAT
Definition: winerror.h:1373
#define RPC_S_INVALID_BINDING
Definition: winerror.h:1369
#define RPC_S_INVALID_OBJECT
Definition: winerror.h:1503
#define RPC_S_UUID_NO_ADDRESS
Definition: winerror.h:1404
#define RPC_S_DUPLICATE_ENDPOINT
Definition: winerror.h:1405
#define ERROR_NOACCESS
Definition: winerror.h:902
#define RPC_S_MAX_CALLS_TOO_SMALL
Definition: winerror.h:1407
#define RPC_S_INVALID_RPC_PROTSEQ
Definition: winerror.h:1371
#define RPC_S_NO_ENTRY_NAME
Definition: winerror.h:1401
#define RPC_S_UNKNOWN_AUTHZ_SERVICE
Definition: winerror.h:1415
#define RPC_S_PROCNUM_OUT_OF_RANGE
Definition: winerror.h:1410
#define RPC_X_SS_CHAR_TRANS_SHORT_FILE
Definition: winerror.h:1439
#define RPC_S_FP_OVERFLOW
Definition: winerror.h:1436
#define RPC_S_UNKNOWN_MGR_TYPE
Definition: winerror.h:1383
#define RPC_S_NO_PROTSEQS_REGISTERED
Definition: winerror.h:1381
#define ERROR_NOT_ENOUGH_SERVER_MEMORY
Definition: winerror.h:990

Referenced by DhcpAcquireParameters(), DhcpQueryHWInfo(), DhcpReleaseParameters(), DhcpRemoveDNSRegistrations(), DhcpStaticRefreshParams(), DsAddressToSiteNamesExW(), DsAddressToSiteNamesW(), DsDeregisterDnsHostRecordsW(), DsEnumerateDomainTrustsW(), DsGetDcNameWithAccountW(), DsGetDcSiteCoverageW(), DsGetForestTrustInformationW(), DsGetSiteNameW(), DsRoleGetPrimaryDomainInformation(), ElfBackupEventLogFileA(), ElfBackupEventLogFileW(), ElfChangeNotify(), ElfClearEventLogFileA(), ElfClearEventLogFileW(), ElfCloseEventLog(), ElfDeregisterEventSource(), ElfFlushEventLog(), ElfNumberOfRecords(), ElfOldestRecord(), ElfOpenBackupEventLogA(), ElfOpenBackupEventLogW(), ElfOpenEventLogA(), ElfOpenEventLogW(), ElfReadEventLogA(), ElfReadEventLogW(), ElfRegisterEventSourceA(), ElfRegisterEventSourceW(), ElfReportEventA(), ElfReportEventAndSourceW(), ElfReportEventW(), GetEventLogInformation(), I_BrowserDebugTrace(), I_BrowserQueryEmulatedDomains(), I_BrowserQueryOtherDomains(), I_BrowserQueryStatistics(), I_BrowserResetNetlogonState(), I_BrowserResetStatistics(), I_BrowserServerEnum(), I_BrowserSetNetlogonState(), I_NetServerSetServiceBits(), LsaAddAccountRights(), LsaAddPrivilegesToAccount(), LsaClearAuditLog(), LsaClose(), LsaCreateAccount(), LsaCreateSecret(), LsaCreateTrustedDomain(), LsaCreateTrustedDomainEx(), LsaDelete(), LsaDeleteTrustedDomain(), LsaEnumerateAccountRights(), LsaEnumerateAccounts(), LsaEnumerateAccountsWithUserRight(), LsaEnumeratePrivileges(), LsaEnumeratePrivilegesOfAccount(), LsaEnumerateTrustedDomains(), LsaEnumerateTrustedDomainsEx(), LsaGetQuotasForAccount(), LsaGetRemoteUserName(), LsaGetSystemAccessAccount(), LsaGetUserName(), LsaLookupNames(), LsaLookupNames2(), LsaLookupPrivilegeDisplayName(), LsaLookupPrivilegeName(), LsaLookupPrivilegeValue(), LsaLookupSids(), LsaOpenAccount(), LsaOpenPolicy(), LsaOpenPolicySce(), LsaOpenSecret(), LsaOpenTrustedDomain(), LsaOpenTrustedDomainByName(), LsaQueryDomainInformationPolicy(), LsaQueryForestTrustInformation(), LsaQueryInformationPolicy(), LsaQueryInfoTrustedDomain(), LsaQuerySecret(), LsaQuerySecurityObject(), LsaQueryTrustedDomainInfo(), LsaQueryTrustedDomainInfoByName(), LsaRemoveAccountRights(), LsaRemovePrivilegesFromAccount(), LsaRetrievePrivateData(), LsarSetSecurityObject(), LsarStartRpcServer(), LsaSetDomainInformationPolicy(), LsaSetForestTrustInformation(), LsaSetInformationPolicy(), LsaSetQuotasForAccount(), LsaSetSecret(), LsaSetSecurityObject(), LsaSetSystemAccessAccount(), LsaStorePrivateData(), NetAddAlternateComputerName(), NetBrowserStatisticsGet(), NetConnectionEnum(), NetDfsAdd(), NetEnumerateComputerNames(), NetEnumerateTrustedDomains(), NetFileClose(), NetFileEnum(), NetFileGetInfo(), NetGetAnyDCName(), NetGetJoinableOUs(), NetGetJoinInformation(), NetJoinDomain(), NetLogonGetTimeServiceParentDomain(), NetRemoteTOD(), NetRemoveAlternateComputerName(), NetRenameMachineInDomain(), NetScheduleJobAdd(), NetScheduleJobDel(), NetScheduleJobEnum(), NetScheduleJobGetInfo(), NetServerDiskEnum(), NetServerGetInfo(), NetServerSetInfo(), NetServerTransportAdd(), NetServerTransportAddEx(), NetServerTransportDel(), NetServerTransportEnum(), NetSessionDel(), NetSessionEnum(), NetSessionGetInfo(), NetSetPrimaryComputerName(), NetShareAdd(), NetShareCheck(), NetShareDel(), NetShareDelSticky(), NetShareEnum(), NetShareEnumSticky(), NetShareGetInfo(), NetShareSetInfo(), NetStatisticsGet(), NetUnjoinDomain(), NetUseAdd(), NetUseDel(), NetUseEnum(), NetUseGetInfo(), NetValidateName(), NetWkstaGetInfo(), NetWkstaSetInfo(), NetWkstaTransportAdd(), NetWkstaTransportDel(), NetWkstaUserEnum(), NetWkstaUserGetInfo(), NetWkstaUserSetInfo(), RpcpAddInterface(), RpcpStartRpcServer(), RpcpStopRpcServer(), RpcpStopRpcServerEx(), SamAddMemberToAlias(), SamAddMemberToGroup(), SamAddMultipleMembersToAlias(), SamChangePasswordUser(), SamCloseHandle(), SamConnect(), SamCreateAliasInDomain(), SamCreateGroupInDomain(), SamCreateUser2InDomain(), SamCreateUserInDomain(), SamDeleteAlias(), SamDeleteGroup(), SamDeleteUser(), SamEnumerateAliasesInDomain(), SamEnumerateDomainsInSamServer(), SamEnumerateGroupsInDomain(), SamEnumerateUsersInDomain(), SamGetAliasMembership(), SamGetDisplayEnumerationIndex(), SamGetGroupsForUser(), SamGetMembersInAlias(), SamGetMembersInGroup(), SamLookupDomainInSamServer(), SamLookupIdsInDomain(), SamLookupNamesInDomain(), SamOpenAlias(), SamOpenDomain(), SamOpenGroup(), SamOpenUser(), SamQueryDisplayInformation(), SamQueryInformationAlias(), SamQueryInformationDomain(), SamQueryInformationGroup(), SamQueryInformationUser(), SamQuerySecurityObject(), SamRemoveMemberFromAlias(), SamRemoveMemberFromForeignDomain(), SamRemoveMemberFromGroup(), SamRemoveMultipleMembersFromAlias(), SamSetInformationAlias(), SamSetInformationDomain(), SamSetInformationGroup(), SamSetInformationUser(), SamSetMemberAttributesOfGroup(), SamSetSecurityObject(), SamShutdownSamServer(), and test_I_RpcMapWin32Status().

◆ I_UuidCreate()

RPC_STATUS WINAPI I_UuidCreate ( UUID Uuid)

Definition at line 488 of file rpcrt4_main.c.

489{
490 return UuidCreateSequential(Uuid);
491}
RPC_STATUS WINAPI UuidCreateSequential(UUID *Uuid)
Definition: rpcrt4_main.c:415

◆ rpc_cancel_thread()

static RPC_STATUS rpc_cancel_thread ( DWORD  target_tid)
static

Definition at line 1064 of file rpcrt4_main.c.

1065{
1066 struct threaddata *tdata;
1067
1070 if (tdata->thread_id == target_tid)
1071 {
1072 EnterCriticalSection(&tdata->cs);
1073 if (tdata->connection) rpcrt4_conn_cancel_call(tdata->connection);
1074 LeaveCriticalSection(&tdata->cs);
1075 break;
1076 }
1078
1079 return RPC_S_OK;
1080}
uint32_t entry
Definition: isohybrid.c:63
static void rpcrt4_conn_cancel_call(RpcConnection *Connection)
Definition: rpc_binding.h:206
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198

Referenced by RpcCancelThreadEx().

◆ RPC_UuidGetNodeAddress()

static RPC_STATUS RPC_UuidGetNodeAddress ( BYTE address)
static

Definition at line 369 of file rpcrt4_main.c.

370{
371 int i;
373
374 ULONG buflen = sizeof(IP_ADAPTER_INFO);
376
378 free(adapter);
379 adapter = malloc(buflen);
380 }
381
382 if (GetAdaptersInfo(adapter, &buflen) == NO_ERROR) {
383 for (i = 0; i < ADDRESS_BYTES_NEEDED; i++) {
384 address[i] = adapter->Address[i];
385 }
386 }
387 /* We can't get a hardware address, just use random numbers.
388 Set the multicast bit to prevent conflicts with real cards. */
389 else {
391 address[0] |= 0x01;
393 }
394
395 free(adapter);
396 return status;
397}
#define NO_ERROR
Definition: dderror.h:5
return adapter
GLuint address
Definition: glext.h:9393
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
DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
#define RtlGenRandom
Definition: ntsecapi.h:691
struct _IP_ADAPTER_INFO IP_ADAPTER_INFO
#define ADDRESS_BYTES_NEEDED
Definition: rpcrt4_main.c:367
uint32_t ULONG
Definition: typedefs.h:59
#define ERROR_BUFFER_OVERFLOW
Definition: winerror.h:307
#define RPC_S_UUID_LOCAL_ONLY
Definition: winerror.h:1488

Referenced by UuidCreateSequential().

◆ RPC_UuidGetSystemTime()

static void RPC_UuidGetSystemTime ( ULONGLONG time)
static

Definition at line 356 of file rpcrt4_main.c.

357{
358 FILETIME ft;
359
361
362 *time = ((ULONGLONG)ft.dwHighDateTime << 32) | ft.dwLowDateTime;
364}
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
__u16 time
Definition: mkdosfs.c:8
#define TICKS_15_OCT_1582_TO_1601
Definition: rpcrt4_main.c:354
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by UuidCreateSequential().

◆ RpcCancelThread()

RPC_STATUS RPC_ENTRY RpcCancelThread ( void ThreadHandle)

Definition at line 1085 of file rpcrt4_main.c.

1086{
1087 TRACE("(%p)\n", ThreadHandle);
1088 return RpcCancelThreadEx(ThreadHandle, 0);
1089}
RPC_STATUS RPC_ENTRY RpcCancelThreadEx(void *ThreadHandle, LONG Timeout)
Definition: rpcrt4_main.c:1094

◆ RpcCancelThreadEx()

RPC_STATUS RPC_ENTRY RpcCancelThreadEx ( void ThreadHandle,
LONG  Timeout 
)

Definition at line 1094 of file rpcrt4_main.c.

1095{
1096 DWORD target_tid;
1097
1098 FIXME("(%p, %ld)\n", ThreadHandle, Timeout);
1099
1100 target_tid = GetThreadId(ThreadHandle);
1101 if (!target_tid)
1102 return RPC_S_INVALID_ARG;
1103
1104 if (Timeout)
1105 {
1106 FIXME("(%p, %ld)\n", ThreadHandle, Timeout);
1107 return RPC_S_OK;
1108 }
1109 else
1110 return rpc_cancel_thread(target_tid);
1111}
#define FIXME(fmt,...)
Definition: precomp.h:53
DWORD WINAPI GetThreadId(IN HANDLE Thread)
Definition: thread.c:913
static ULONG Timeout
Definition: ping.c:61
static RPC_STATUS rpc_cancel_thread(DWORD target_tid)
Definition: rpcrt4_main.c:1064

Referenced by RpcCancelThread().

◆ RpcErrorEndEnumeration()

RPC_STATUS RPC_ENTRY RpcErrorEndEnumeration ( RPC_ERROR_ENUM_HANDLE EnumHandle)

Definition at line 921 of file rpcrt4_main.c.

922{
923 FIXME("(%p): stub\n", EnumHandle);
924 return RPC_S_OK;
925}

◆ RpcErrorGetNextRecord()

RPC_STATUS RPC_ENTRY RpcErrorGetNextRecord ( RPC_ERROR_ENUM_HANDLE EnumHandle,
BOOL  CopyStrings,
RPC_EXTENDED_ERROR_INFO ErrorInfo 
)

Definition at line 948 of file rpcrt4_main.c.

949{
950 FIXME("(%p %x %p): stub\n", EnumHandle, CopyStrings, ErrorInfo);
952}

◆ RpcErrorLoadErrorInfo()

RPC_STATUS RPC_ENTRY RpcErrorLoadErrorInfo ( void ErrorBlob,
SIZE_T  BlobSize,
RPC_ERROR_ENUM_HANDLE EnumHandle 
)

Definition at line 939 of file rpcrt4_main.c.

940{
941 FIXME("(%p %Iu %p): stub\n", ErrorBlob, BlobSize, EnumHandle);
943}
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102

◆ RpcErrorSaveErrorInfo()

RPC_STATUS RPC_ENTRY RpcErrorSaveErrorInfo ( RPC_ERROR_ENUM_HANDLE EnumHandle,
void **  ErrorBlob,
SIZE_T BlobSize 
)

Definition at line 930 of file rpcrt4_main.c.

931{
932 FIXME("(%p %p %p): stub\n", EnumHandle, ErrorBlob, BlobSize);
934}

◆ RpcErrorStartEnumeration()

RPC_STATUS RPC_ENTRY RpcErrorStartEnumeration ( RPC_ERROR_ENUM_HANDLE EnumHandle)

Definition at line 912 of file rpcrt4_main.c.

913{
914 FIXME("(%p): stub\n", EnumHandle);
916}

◆ RpcExceptionFilter()

int WINAPI RpcExceptionFilter ( ULONG  ExceptionCode)

Definition at line 890 of file rpcrt4_main.c.

891{
892 TRACE("0x%lx\n", ExceptionCode);
893 switch (ExceptionCode)
894 {
904 default:
906 }
907}
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
Definition: cdprocs.h:1774
#define STATUS_ILLEGAL_INSTRUCTION
Definition: d3dkmdt.h:41
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define EXCEPTION_CONTINUE_SEARCH
Definition: excpt.h:91
#define STATUS_POSSIBLE_DEADLOCK
Definition: ntstatus.h:731
#define STATUS_INSTRUCTION_MISALIGNMENT
Definition: ntstatus.h:500
#define STATUS_STACK_OVERFLOW
Definition: ntstatus.h:583
#define STATUS_PRIVILEGED_INSTRUCTION
Definition: ntstatus.h:480
#define STATUS_BREAKPOINT
Definition: ntstatus.h:264
#define STATUS_DATATYPE_MISALIGNMENT
Definition: ntstatus.h:263

Referenced by test_RpcExceptionFilter().

◆ RpcIfInqId()

RPC_STATUS WINAPI RpcIfInqId ( RPC_IF_HANDLE  if_handle,
RPC_IF_ID if_id 
)

Definition at line 194 of file rpcrt4_main.c.

195{
196 struct interface_header *header = (struct interface_header *)if_handle;
197
198 TRACE("(%p,%p)\n", if_handle, if_id);
199
200 if_id->Uuid = header->id.SyntaxGUID;
201 if_id->VersMajor = header->id.SyntaxVersion.MajorVersion;
202 if_id->VersMinor = header->id.SyntaxVersion.MinorVersion;
203 TRACE("UUID:%s VersMajor:%hu VersMinor:%hu.\n", debugstr_guid(&if_id->Uuid), if_id->VersMajor,
204 if_id->VersMinor);
205 return RPC_S_OK;
206}
#define debugstr_guid
Definition: kernel32.h:35
unsigned short VersMajor
Definition: rpcdce.h:72
UUID Uuid
Definition: rpcdce.h:71
unsigned short VersMinor
Definition: rpcdce.h:73

◆ RpcMgmtSetCancelTimeout()

RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout ( LONG  Timeout)

Definition at line 957 of file rpcrt4_main.c.

958{
959 FIXME("(%ld): stub\n", Timeout);
960 return RPC_S_OK;
961}

◆ RpcRaiseException()

void DECLSPEC_NORETURN WINAPI RpcRaiseException ( RPC_STATUS  exception)

Definition at line 213 of file rpcrt4_main.c.

214{
215 /* shouldn't return */
217 ERR("handler continued execution\n");
218 ExitProcess(1);
219}
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
Definition: except.c:700
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1489

Referenced by array_buffer_size(), array_compute_and_size_conformance(), array_compute_and_write_conformance(), array_free(), array_memory_size(), array_read_conformance(), array_read_variance_and_unmarshall(), array_write_variance_and_marshall(), call_buffer_sizer(), call_marshaller(), call_unmarshaller(), client_do_args(), client_free_handle(), client_get_handle(), ComplexMarshall(), ComplexUnmarshall(), convert_old_args(), CtxClose(), CtxHello(), CtxOpen(), dispatch_rpc(), do_ndr_async_client_call(), EmbeddedComplexSize(), es_data_alloc(), es_data_read(), get_arm_offset_from_union_arm_selector(), hello_CtxClose(), hello_CtxHello(), hello_CtxOpen(), HMETAFILEPICT_UserUnmarshal(), LPSAFEARRAY_UserMarshal(), LPSAFEARRAY_UserSize(), LPSAFEARRAY_UserUnmarshal(), m_CtxClose(), m_CtxHello(), m_CtxOpen(), mes_proc_header_unmarshal(), ndr_client_call(), NdrAllocate(), NdrAsyncServerCall(), NdrBaseTypeMarshall(), NDRCContextBinding(), NDRCContextUnmarshall(), NdrClientContextMarshall(), NdrClientContextUnmarshall(), NdrComplexArrayBufferSize(), NdrComplexArrayFree(), NdrComplexArrayMarshall(), NdrComplexArrayMemorySize(), NdrComplexArrayUnmarshall(), NdrConformantArrayBufferSize(), NdrConformantArrayFree(), NdrConformantArrayMarshall(), NdrConformantArrayMemorySize(), NdrConformantArrayUnmarshall(), NdrConformantStringBufferSize(), NdrConformantStringMarshall(), NdrConformantStringMemorySize(), NdrConformantStringUnmarshall(), NdrConformantStructBufferSize(), NdrConformantStructFree(), NdrConformantStructMarshall(), NdrConformantStructUnmarshall(), NdrConformantVaryingArrayBufferSize(), NdrConformantVaryingArrayFree(), NdrConformantVaryingArrayMarshall(), NdrConformantVaryingArrayMemorySize(), NdrConformantVaryingArrayUnmarshall(), NdrConformantVaryingStructBufferSize(), NdrConformantVaryingStructFree(), NdrConformantVaryingStructMarshall(), NdrConformantVaryingStructMemorySize(), NdrConformantVaryingStructUnmarshall(), NdrContextHandleBufferSize(), NdrContextHandleMarshall(), NdrContextHandleUnmarshall(), NdrFixedArrayBufferSize(), NdrFixedArrayFree(), NdrFixedArrayMarshall(), NdrFixedArrayMemorySize(), NdrFixedArrayUnmarshall(), NdrGetBuffer(), NdrInterfacePointerMarshall(), NdrInterfacePointerUnmarshall(), NdrMesProcEncodeDecode(), NdrNonConformantStringBufferSize(), NdrNonConformantStringMarshall(), NdrNonConformantStringMemorySize(), NdrNonConformantStringUnmarshall(), NdrpCompleteAsyncServerCall(), NdrPointerUnmarshall(), NdrProxyGetBuffer(), NdrProxyInitialize(), NdrProxySendReceive(), NdrRangeBufferSize(), NdrRangeMarshall(), NdrRangeMemorySize(), NdrRangeUnmarshall(), NDRSContextMarshall2(), NDRSContextUnmarshall2(), NdrSendReceive(), NdrServerContextMarshall(), NdrServerContextNewMarshall(), NdrServerContextNewUnmarshall(), NdrServerContextUnmarshall(), NdrStubCall2(), NdrStubForwardingFunction(), NdrStubGetBuffer(), NdrVaryingArrayBufferSize(), NdrVaryingArrayFree(), NdrVaryingArrayMarshall(), NdrVaryingArrayMemorySize(), NdrVaryingArrayUnmarshall(), PointerBufferSize(), PointerMarshall(), PointerMemorySize(), PointerUnmarshall(), PSAMPR_SERVER_NAME_bind(), ReadConformance(), ReadVariance(), RpcSsDestroyClientContext(), safe_buffer_increment(), safe_buffer_length_increment(), safe_copy_from_buffer(), safe_copy_to_buffer(), safe_multiply(), SAFEARRAY_GetUnionType(), SizeConformance(), SizeVariance(), STGMEDIUM_UserUnmarshal(), stub_do_args(), type_stack_size(), union_arm_marshall(), union_arm_unmarshall(), validate_string_data(), WriteConformance(), and WriteVariance().

◆ RPCRT4_GetThreadCurrentCallHandle()

RpcBinding * RPCRT4_GetThreadCurrentCallHandle ( void  )

Definition at line 1003 of file rpcrt4_main.c.

1004{
1005 struct threaddata *tdata = get_or_create_threaddata();
1006 if (!tdata) return NULL;
1007
1008 return tdata->server_binding;
1009}
static struct threaddata * get_or_create_threaddata(void)
Definition: rpcrt4_main.c:963

Referenced by I_RpcBindingInqLocalClientPID(), and I_RpcGetCurrentCallHandle().

◆ RPCRT4_PopThreadContextHandle()

NDR_SCONTEXT RPCRT4_PopThreadContextHandle ( void  )

Definition at line 1047 of file rpcrt4_main.c.

1048{
1049 struct threaddata *tdata = get_or_create_threaddata();
1052
1053 if (!tdata) return NULL;
1054
1056 if (!context_handle_list) return NULL;
1058
1061 return context_handle;
1062}
NDR_SCONTEXT context_handle
Definition: rpcrt4_main.c:85
struct context_handle_list * next
Definition: rpcrt4_main.c:84
struct context_handle_list * context_handle_list
Definition: rpcrt4_main.c:95

Referenced by process_request_packet().

◆ RPCRT4_PushThreadContextHandle()

void RPCRT4_PushThreadContextHandle ( NDR_SCONTEXT  SContext)

Definition at line 1011 of file rpcrt4_main.c.

1012{
1013 struct threaddata *tdata = get_or_create_threaddata();
1015
1016 if (!tdata) return;
1017
1019 if (!context_handle_list) return;
1020
1024}

Referenced by NDRSContextUnmarshall2().

◆ RPCRT4_RemoveThreadContextHandle()

void RPCRT4_RemoveThreadContextHandle ( NDR_SCONTEXT  SContext)

Definition at line 1026 of file rpcrt4_main.c.

1027{
1028 struct threaddata *tdata = get_or_create_threaddata();
1029 struct context_handle_list *current, *prev;
1030
1031 if (!tdata) return;
1032
1033 for (current = tdata->context_handle_list, prev = NULL; current; prev = current, current = current->next)
1034 {
1035 if (current->context_handle == SContext)
1036 {
1037 if (prev)
1038 prev->next = current->next;
1039 else
1040 tdata->context_handle_list = current->next;
1041 free(current);
1042 return;
1043 }
1044 }
1045}
struct task_struct * current
Definition: linux.c:32

Referenced by NDRSContextMarshall2().

◆ RPCRT4_SetThreadCurrentCallHandle()

void RPCRT4_SetThreadCurrentCallHandle ( RpcBinding Binding)

Definition at line 995 of file rpcrt4_main.c.

996{
997 struct threaddata *tdata = get_or_create_threaddata();
998 if (!tdata) return;
999
1000 tdata->server_binding = Binding;
1001}

Referenced by process_request_packet().

◆ RPCRT4_SetThreadCurrentConnection()

void RPCRT4_SetThreadCurrentConnection ( RpcConnection Connection)

Definition at line 985 of file rpcrt4_main.c.

986{
987 struct threaddata *tdata = get_or_create_threaddata();
988 if (!tdata) return;
989
990 EnterCriticalSection(&tdata->cs);
991 tdata->connection = Connection;
992 LeaveCriticalSection(&tdata->cs);
993}

Referenced by RPCRT4_ReceiveWithAuth(), and RPCRT4_SendWithAuth().

◆ RpcStringFreeA()

◆ RpcStringFreeW()

◆ UuidCompare()

int WINAPI UuidCompare ( UUID Uuid1,
UUID Uuid2,
RPC_STATUS Status 
)

Definition at line 234 of file rpcrt4_main.c.

235{
236 int i;
237
238 TRACE("(%s,%s)\n", debugstr_guid(Uuid1), debugstr_guid(Uuid2));
239
240 *Status = RPC_S_OK;
241
242 if (!Uuid1) Uuid1 = &uuid_nil;
243 if (!Uuid2) Uuid2 = &uuid_nil;
244
245 if (Uuid1 == Uuid2) return 0;
246
247 if (Uuid1->Data1 != Uuid2->Data1)
248 return Uuid1->Data1 < Uuid2->Data1 ? -1 : 1;
249
250 if (Uuid1->Data2 != Uuid2->Data2)
251 return Uuid1->Data2 < Uuid2->Data2 ? -1 : 1;
252
253 if (Uuid1->Data3 != Uuid2->Data3)
254 return Uuid1->Data3 < Uuid2->Data3 ? -1 : 1;
255
256 for (i = 0; i < 8; i++) {
257 if (Uuid1->Data4[i] < Uuid2->Data4[i])
258 return -1;
259 if (Uuid1->Data4[i] > Uuid2->Data4[i])
260 return 1;
261 }
262
263 return 0;
264}
Status
Definition: gdiplustypes.h:25
static UUID uuid_nil
Definition: rpcrt4_main.c:60

Referenced by LookupObjTypeMap(), RpcObjectSetType(), UuidEqual(), and UuidIsNil().

◆ UuidCreate()

RPC_STATUS WINAPI UuidCreate ( UUID Uuid)

Definition at line 330 of file rpcrt4_main.c.

331{
332 RtlGenRandom(Uuid, sizeof(*Uuid));
333 /* Clear the version bits and set the version (4) */
334 Uuid->Data3 &= 0x0fff;
335 Uuid->Data3 |= (4 << 12);
336 /* Set the topmost bits of Data4 (clock_seq_hi_and_reserved) as
337 * specified in RFC 4122, section 4.4.
338 */
339 Uuid->Data4[0] &= 0x3f;
340 Uuid->Data4[0] |= 0x80;
341
342 TRACE("%s\n", debugstr_guid(Uuid));
343
344 return RPC_S_OK;
345}

Referenced by AllocAndInitializeTelemetryContext(), CoCreateGuid(), CreateInstanceKey(), CRYPT_CreateMachineGuid(), generate_ipid(), GetCurrentHwProfileW(), InstallDevice(), NetClassInstaller(), RpcAssoc_Alloc(), rpcrt4_ncacn_http_open(), RpcServerAssoc_UpdateContextHandle(), test_QueryPathOfRegTypeLib(), test_UuidCreate(), and uuid_generate().

◆ UuidCreateNil()

RPC_STATUS WINAPI UuidCreateNil ( UUID Uuid)

Definition at line 309 of file rpcrt4_main.c.

310{
311 *Uuid = uuid_nil;
312 return RPC_S_OK;
313}

Referenced by generate_ipid(), RPCRT4_SetBindingObject(), UuidFromStringA(), and UuidFromStringW().

◆ UuidCreateSequential()

RPC_STATUS WINAPI UuidCreateSequential ( UUID Uuid)

Definition at line 415 of file rpcrt4_main.c.

416{
417 static BOOL initialised;
418 static int count;
419
421 static ULONGLONG timelast;
422 static WORD sequence;
423
424 static DWORD status;
426
428
429 if (!initialised) {
430 RPC_UuidGetSystemTime(&timelast);
432
433 sequence = ((rand() & 0xff) << 8) + (rand() & 0xff);
434 sequence &= 0x1fff;
435
437 initialised = TRUE;
438 }
439
440 /* Generate time element of the UUID. Account for going faster
441 than our clock as well as the clock going backwards. */
442 while (1) {
444 if (time > timelast) {
445 count = 0;
446 break;
447 }
448 if (time < timelast) {
449 sequence = (sequence + 1) & 0x1fff;
450 count = 0;
451 break;
452 }
454 count++;
455 break;
456 }
457 }
458
459 timelast = time;
460 time += count;
461
462 /* Pack the information into the UUID structure. */
463
464 Uuid->Data1 = (ULONG)(time & 0xffffffff);
465 Uuid->Data2 = (unsigned short)((time >> 32) & 0xffff);
466 Uuid->Data3 = (unsigned short)((time >> 48) & 0x0fff);
467
468 /* This is a version 1 UUID */
469 Uuid->Data3 |= (1 << 12);
470
471 Uuid->Data4[0] = sequence & 0xff;
472 Uuid->Data4[1] = (sequence & 0x3f00) >> 8;
473 Uuid->Data4[1] |= 0x80;
474 memcpy(&Uuid->Data4[2], address, ADDRESS_BYTES_NEEDED);
475
477
478 TRACE("%s\n", debugstr_guid(Uuid));
479
480 return status;
481}
static struct recvd_message * sequence
Definition: SystemMenu.c:63
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define MAX_ADAPTER_ADDRESS_LENGTH
Definition: iptypes.h:17
static RPC_STATUS RPC_UuidGetNodeAddress(BYTE *address)
Definition: rpcrt4_main.c:369
static void RPC_UuidGetSystemTime(ULONGLONG *time)
Definition: rpcrt4_main.c:356
#define TICKS_PER_CLOCK_TICK
Definition: rpcrt4_main.c:349
_Check_return_ int __cdecl rand(void)
Definition: rand.c:10
unsigned char BYTE
Definition: xxhash.c:193

Referenced by I_UuidCreate().

◆ UuidEqual()

int WINAPI UuidEqual ( UUID Uuid1,
UUID Uuid2,
RPC_STATUS Status 
)

Definition at line 277 of file rpcrt4_main.c.

278{
279 TRACE("(%s,%s)\n", debugstr_guid(Uuid1), debugstr_guid(Uuid2));
280 return !UuidCompare(Uuid1, Uuid2, Status);
281}
int WINAPI UuidCompare(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
Definition: rpcrt4_main.c:234

Referenced by ProcessDeviceClassChangeEvent(), ProcessTargetDeviceEvent(), RPCRT4_find_interface(), RpcServerUnregisterIf(), test_UuidCreate(), test_UuidEqual(), and test_UuidFromString().

◆ UuidFromStringA()

RPC_STATUS WINAPI UuidFromStringA ( RPC_CSTR  s,
UUID uuid 
)

Definition at line 615 of file rpcrt4_main.c.

616{
617 int i;
618
619 if (!s) return UuidCreateNil( uuid );
620
621 if (strlen((char*)s) != 36) return RPC_S_INVALID_STRING_UUID;
622
623 if ((s[8]!='-') || (s[13]!='-') || (s[18]!='-') || (s[23]!='-'))
625
626 for (i=0; i<36; i++)
627 {
628 if ((i == 8)||(i == 13)||(i == 18)||(i == 23)) continue;
629 if (s[i] > 'f' || (!hex2bin[s[i]] && s[i] != '0')) return RPC_S_INVALID_STRING_UUID;
630 }
631
632 /* in form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */
633
634 uuid->Data1 = (hex2bin[s[0]] << 28 | hex2bin[s[1]] << 24 | hex2bin[s[2]] << 20 | hex2bin[s[3]] << 16 |
635 hex2bin[s[4]] << 12 | hex2bin[s[5]] << 8 | hex2bin[s[6]] << 4 | hex2bin[s[7]]);
636 uuid->Data2 = hex2bin[s[9]] << 12 | hex2bin[s[10]] << 8 | hex2bin[s[11]] << 4 | hex2bin[s[12]];
637 uuid->Data3 = hex2bin[s[14]] << 12 | hex2bin[s[15]] << 8 | hex2bin[s[16]] << 4 | hex2bin[s[17]];
638
639 /* these are just sequential bytes */
640 uuid->Data4[0] = hex2bin[s[19]] << 4 | hex2bin[s[20]];
641 uuid->Data4[1] = hex2bin[s[21]] << 4 | hex2bin[s[22]];
642 uuid->Data4[2] = hex2bin[s[24]] << 4 | hex2bin[s[25]];
643 uuid->Data4[3] = hex2bin[s[26]] << 4 | hex2bin[s[27]];
644 uuid->Data4[4] = hex2bin[s[28]] << 4 | hex2bin[s[29]];
645 uuid->Data4[5] = hex2bin[s[30]] << 4 | hex2bin[s[31]];
646 uuid->Data4[6] = hex2bin[s[32]] << 4 | hex2bin[s[33]];
647 uuid->Data4[7] = hex2bin[s[34]] << 4 | hex2bin[s[35]];
648 return RPC_S_OK;
649}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039
Definition: msctf.idl:532
unsigned short Data3
Definition: widltypes.h:34
unsigned int Data1
Definition: widltypes.h:32
unsigned char Data4[8]
Definition: widltypes.h:35
unsigned short Data2
Definition: widltypes.h:33
static const BYTE hex2bin[]
Definition: rpcrt4_main.c:601
RPC_STATUS WINAPI UuidCreateNil(UUID *Uuid)
Definition: rpcrt4_main.c:309

Referenced by RpcBindingFromStringBindingA(), RpcStringBindingParseA(), and test_UuidFromString().

◆ UuidFromStringW()

RPC_STATUS WINAPI UuidFromStringW ( RPC_WSTR  s,
UUID uuid 
)

Definition at line 655 of file rpcrt4_main.c.

656{
657 int i;
658
659 if (!s) return UuidCreateNil( uuid );
660
661 if (lstrlenW(s) != 36) return RPC_S_INVALID_STRING_UUID;
662
663 if ((s[8]!='-') || (s[13]!='-') || (s[18]!='-') || (s[23]!='-'))
665
666 for (i=0; i<36; i++)
667 {
668 if ((i == 8)||(i == 13)||(i == 18)||(i == 23)) continue;
669 if (s[i] > 'f' || (!hex2bin[s[i]] && s[i] != '0')) return RPC_S_INVALID_STRING_UUID;
670 }
671
672 /* in form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */
673
674 uuid->Data1 = (hex2bin[s[0]] << 28 | hex2bin[s[1]] << 24 | hex2bin[s[2]] << 20 | hex2bin[s[3]] << 16 |
675 hex2bin[s[4]] << 12 | hex2bin[s[5]] << 8 | hex2bin[s[6]] << 4 | hex2bin[s[7]]);
676 uuid->Data2 = hex2bin[s[9]] << 12 | hex2bin[s[10]] << 8 | hex2bin[s[11]] << 4 | hex2bin[s[12]];
677 uuid->Data3 = hex2bin[s[14]] << 12 | hex2bin[s[15]] << 8 | hex2bin[s[16]] << 4 | hex2bin[s[17]];
678
679 /* these are just sequential bytes */
680 uuid->Data4[0] = hex2bin[s[19]] << 4 | hex2bin[s[20]];
681 uuid->Data4[1] = hex2bin[s[21]] << 4 | hex2bin[s[22]];
682 uuid->Data4[2] = hex2bin[s[24]] << 4 | hex2bin[s[25]];
683 uuid->Data4[3] = hex2bin[s[26]] << 4 | hex2bin[s[27]];
684 uuid->Data4[4] = hex2bin[s[28]] << 4 | hex2bin[s[29]];
685 uuid->Data4[5] = hex2bin[s[30]] << 4 | hex2bin[s[31]];
686 uuid->Data4[6] = hex2bin[s[32]] << 4 | hex2bin[s[33]];
687 uuid->Data4[7] = hex2bin[s[34]] << 4 | hex2bin[s[35]];
688 return RPC_S_OK;
689}
#define lstrlenW
Definition: compat.h:750

Referenced by CM_Enumerate_Classes_Ex(), get_token(), GetVersionInformationFromInfFile(), InitProbeListPage(), PARSER_GetInfClassW(), pSetupGuidFromString(), RpcBindingFromStringBindingW(), RpcStringBindingParseW(), SETUP_CreateDevicesList(), SETUP_CreateInterfaceList(), SetupDiClassGuidsFromNameExW(), SetupDiInstallDeviceInterfaces(), SetupDiOpenDeviceInfoW(), SetupDiOpenDeviceInterfaceW(), and test_UuidFromString().

◆ UuidHash()

unsigned short WINAPI UuidHash ( UUID uuid,
RPC_STATUS Status 
)

Definition at line 501 of file rpcrt4_main.c.

502{
503 BYTE *data = (BYTE*)uuid;
504 short c0 = 0, c1 = 0, x, y;
505 unsigned int i;
506
507 if (!uuid) data = (BYTE*)(uuid = &uuid_nil);
508
509 TRACE("(%s)\n", debugstr_guid(uuid));
510
511 for (i=0; i<sizeof(UUID); i++) {
512 c0 += data[i];
513 c1 += c0;
514 }
515
516 x = -c1 % 255;
517 if (x < 0) x += 255;
518
519 y = (c1 - c0) % 255;
520 if (y < 0) y += 255;
521
522 *Status = RPC_S_OK;
523 return y*256 + x;
524}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GUID UUID
Definition: module.h:1093

◆ UuidIsNil()

◆ UuidToStringA()

RPC_STATUS WINAPI UuidToStringA ( UUID Uuid,
RPC_CSTR StringUuid 
)

Definition at line 539 of file rpcrt4_main.c.

540{
541 *StringUuid = malloc(37);
542
543 if(!(*StringUuid))
544 return RPC_S_OUT_OF_MEMORY;
545
546 if (!Uuid) Uuid = &uuid_nil;
547
548#ifdef __REACTOS__
549 sprintf( (char*)*StringUuid, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
550 Uuid->Data1, Uuid->Data2, Uuid->Data3,
551 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
552 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
553 Uuid->Data4[6], Uuid->Data4[7] );
554#else
555 sprintf( (char*)*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
556 Uuid->Data1, Uuid->Data2, Uuid->Data3,
557 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
558 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
559 Uuid->Data4[6], Uuid->Data4[7] );
560#endif
561
562 return RPC_S_OK;
563}
#define sprintf
Definition: sprintf.c:45
#define RPC_S_OUT_OF_MEMORY
Definition: rpcnterr.h:24

Referenced by RpcBindingToStringBindingA(), and test_UuidFromString().

◆ UuidToStringW()

RPC_STATUS WINAPI UuidToStringW ( UUID Uuid,
RPC_WSTR StringUuid 
)

Definition at line 573 of file rpcrt4_main.c.

574{
575 char buf[37];
576
577 if (!Uuid) Uuid = &uuid_nil;
578
579#ifdef __REACTOS__
580 sprintf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
581 Uuid->Data1, Uuid->Data2, Uuid->Data3,
582 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
583 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
584 Uuid->Data4[6], Uuid->Data4[7] );
585#else
586 sprintf(buf, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
587 Uuid->Data1, Uuid->Data2, Uuid->Data3,
588 Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
589 Uuid->Data4[3], Uuid->Data4[4], Uuid->Data4[5],
590 Uuid->Data4[6], Uuid->Data4[7] );
591#endif
592
593 *StringUuid = RPCRT4_strdupAtoW(buf);
594
595 if(!(*StringUuid))
596 return RPC_S_OUT_OF_MEMORY;
597
598 return RPC_S_OK;
599}
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
LPWSTR RPCRT4_strdupAtoW(LPCSTR src)
Definition: rpc_binding.c:57

Referenced by CM_Open_Class_Key_ExW(), CreateInstanceKey(), get_settingid(), GuidToString(), NetClassInstaller(), pSetupStringFromGuid(), SETUPDI_CreateDrvKey(), SetupDiInstallDevice(), and test_UuidFromString().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( rpc  )

Variable Documentation

◆ critsect_debug

CRITICAL_SECTION_DEBUG critsect_debug
static
Initial value:
=
{
0, 0, &uuid_cs,
0, 0, { (DWORD_PTR)(__FILE__ ": uuid_cs") }
}
static CRITICAL_SECTION_DEBUG critsect_debug
Definition: rpcrt4_main.c:63

Definition at line 63 of file rpcrt4_main.c.

◆ hex2bin

const BYTE hex2bin[]
static
Initial value:
=
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,
0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,10,11,12,13,14,15
}

Definition at line 601 of file rpcrt4_main.c.

Referenced by UuidFromStringA(), and UuidFromStringW().

◆ threaddata_cs

static CRITICAL_SECTION threaddata_cs = { &threaddata_cs_debug, -1, 0, 0, 0, 0 }
static

Definition at line 71 of file rpcrt4_main.c.

Referenced by DllMain(), get_or_create_threaddata(), and rpc_cancel_thread().

◆ threaddata_cs_debug

CRITICAL_SECTION_DEBUG threaddata_cs_debug
static
Initial value:
=
{
0, 0, &threaddata_cs,
0, 0, { (DWORD_PTR)(__FILE__ ": threaddata_cs") }
}
static CRITICAL_SECTION_DEBUG threaddata_cs_debug
Definition: rpcrt4_main.c:72

Definition at line 72 of file rpcrt4_main.c.

◆ threaddata_list

struct list threaddata_list = LIST_INIT(threaddata_list)
static

Definition at line 80 of file rpcrt4_main.c.

Referenced by get_or_create_threaddata(), and rpc_cancel_thread().

◆ uuid_cs

static CRITICAL_SECTION uuid_cs = { &critsect_debug, -1, 0, 0, 0, 0 }
static

Definition at line 62 of file rpcrt4_main.c.

Referenced by DllMain(), and UuidCreateSequential().

◆ uuid_nil

UUID uuid_nil
static