Nikolay Sivov : rpcrt4: Export I_UuidCreate().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 10 10:10:02 CDT 2015
Module: wine
Branch: master
Commit: 66c05a4597e364aaeb3a6d45557346360bcac30b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=66c05a4597e364aaeb3a6d45557346360bcac30b
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Mar 9 01:20:48 2015 +0300
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 c42fd8b..244bc2a 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 ef78b03..d5d349d 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 07ca7eb..34f7fac 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));
}
}
More information about the wine-cvs
mailing list