From 66c05a4597e364aaeb3a6d45557346360bcac30b Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 9 Mar 2015 01:20:48 +0300 Subject: [PATCH] rpcrt4: Export I_UuidCreate(). --- dlls/rpcrt4/rpcrt4.spec | 2 +- dlls/rpcrt4/rpcrt4_main.c | 9 +++++++++ dlls/rpcrt4/tests/rpc.c | 14 +++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index c42fd8b4e57..244bc2a626a 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -93,7 +93,7 @@ @ stub I_RpcTransServerNewConnection @ stub I_RpcTurnOnEEInfoPropagation # wxp @ stdcall I_RpcWindowProc(ptr long long long) # win9x -@ stub I_UuidCreate +@ stdcall I_UuidCreate(ptr) @ stub MIDL_wchar_strcpy @ stub MIDL_wchar_strlen @ stdcall MesBufferHandleReset(ptr long long ptr long ptr) diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index ef78b03839b..d5d349dc58f 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -456,6 +456,15 @@ RPC_STATUS WINAPI UuidCreateSequential(UUID *Uuid) return status; } +/************************************************************************* + * I_UuidCreate [RPCRT4.@] + * + * See UuidCreateSequential() + */ +RPC_STATUS WINAPI I_UuidCreate(UUID *Uuid) +{ + return UuidCreateSequential(Uuid); +} /************************************************************************* * UuidHash [RPCRT4.@] diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 07ca7ebe619..34f7fac2ffb 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -791,13 +791,17 @@ static void test_UuidCreateSequential(void) UUID guid1; BYTE version; RPC_STATUS (WINAPI *pUuidCreateSequential)(UUID *) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "UuidCreateSequential"); + RPC_STATUS (WINAPI *pI_UuidCreate)(UUID *) = (void*)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "I_UuidCreate"); RPC_STATUS ret; if (!pUuidCreateSequential) { - skip("UuidCreateSequential not exported\n"); + win_skip("UuidCreateSequential not exported\n"); return; } + + ok(pI_UuidCreate != pUuidCreateSequential, "got %p, %p\n", pI_UuidCreate, pUuidCreateSequential); + ret = pUuidCreateSequential(&guid1); ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY, "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret); @@ -836,6 +840,14 @@ static void test_UuidCreateSequential(void) ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)), "unexpected value in MAC address: %s\n", wine_dbgstr_guid(&guid2)); + + /* I_UuidCreate does exactly the same */ + pI_UuidCreate(&guid2); + version = (guid2.Data3 & 0xf000) >> 12; + ok(version == 1, "unexpected version %d\n", version); + ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)), + "unexpected value in MAC address: %s\n", + wine_dbgstr_guid(&guid2)); } } -- 2.11.4.GIT