Implemented UuidCompare.

This commit is contained in:
Greg Turner 2002-10-07 21:52:55 +00:00 committed by Alexandre Julliard
parent 9b239925a9
commit 13b0f9f5ad
2 changed files with 32 additions and 7 deletions

View File

@ -171,7 +171,7 @@ init RPCRT4_LibMain
@ stub TowerConstruct
@ stub TowerExplode
@ stub UuidCompare
@ stdcall UuidCompare(ptr ptr ptr) UuidCompare
@ stdcall UuidCreate(ptr) UuidCreate
@ stdcall UuidCreateSequential(ptr) UuidCreateSequential # win 2000
@ stdcall UuidCreateNil(ptr) UuidCreateNil

View File

@ -138,14 +138,39 @@ RPC_STATUS WINAPI RpcStringFreeW(LPWSTR* String)
* RETURNS
* TRUE/FALSE
*/
int WINAPI UuidEqual(UUID *uuid1, UUID *uuid2, RPC_STATUS *Status)
int WINAPI UuidEqual(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
{
TRACE("(%s,%s)\n", debugstr_guid(uuid1), debugstr_guid(uuid2));
TRACE("(%s,%s)\n", debugstr_guid(Uuid1), debugstr_guid(Uuid2));
*Status = RPC_S_OK;
if (!uuid1) uuid1 = &uuid_nil;
if (!uuid2) uuid2 = &uuid_nil;
if (uuid1 == uuid2) return TRUE;
return !memcmp(uuid1, uuid2, sizeof(UUID));
if (!Uuid1) Uuid1 = &uuid_nil;
if (!Uuid2) Uuid2 = &uuid_nil;
if (Uuid1 == Uuid2) return TRUE;
return !memcmp(Uuid1, Uuid2, sizeof(UUID));
}
/*************************************************************************
* UuidCompare [RPCRT4.@]
*
* (an educated-guess implementation)
*
* PARAMS
* UUID *Uuid1 [I] Uuid to compare
* UUID *Uuid2 [I] Uuid to compare
* RPC_STATUS *Status [O] returns RPC_S_OK
*
* RETURNS
* -1 if Uuid1 is less than Uuid2
* 0 if Uuid1 and Uuid2 are equal
* 1 if Uuid1 is greater than Uuid2
*/
int WINAPI UuidCompare(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status)
{
TRACE("(%s,%s)\n", debugstr_guid(Uuid1), debugstr_guid(Uuid2));
*Status = RPC_S_OK;
if (!Uuid1) Uuid1 = &uuid_nil;
if (!Uuid2) Uuid2 = &uuid_nil;
if (Uuid1 == Uuid2) return 0;
return memcmp(Uuid1, Uuid2, sizeof(UUID));
}
/*************************************************************************