Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f9650f40
Commit
f9650f40
authored
Oct 03, 2002
by
Ove Kaaven
Committed by
Alexandre Julliard
Oct 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added UuidCreateNil, UuidEqual and UuidIsNil.
parent
54f22873
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
9 deletions
+66
-9
rpcrt4.spec
dlls/rpcrt4/rpcrt4.spec
+5
-5
rpcrt4_main.c
dlls/rpcrt4/rpcrt4_main.c
+61
-4
No files found.
dlls/rpcrt4/rpcrt4.spec
View file @
f9650f40
...
...
@@ -174,12 +174,12 @@ init RPCRT4_LibMain
@ stub UuidCompare
@ stdcall UuidCreate(ptr) UuidCreate
@ stdcall UuidCreateSequential(ptr) UuidCreateSequential # win 2000
@ st
ub
UuidCreateNil
@ st
ub
UuidEqual
@ stdcall UuidFromStringA(
p
tr ptr) UuidFromStringA
@ stdcall UuidFromStringW(
p
tr ptr) UuidFromStringW
@ st
dcall UuidCreateNil(ptr)
UuidCreateNil
@ st
dcall UuidEqual(ptr ptr ptr)
UuidEqual
@ stdcall UuidFromStringA(
s
tr ptr) UuidFromStringA
@ stdcall UuidFromStringW(
ws
tr ptr) UuidFromStringW
@ stdcall UuidHash(ptr ptr) UuidHash
@ st
ub
UuidIsNil
@ st
dcall UuidIsNil(ptr ptr)
UuidIsNil
@ stdcall UuidToStringA(ptr ptr) UuidToStringA
@ stub UuidToStringW
...
...
dlls/rpcrt4/rpcrt4_main.c
View file @
f9650f40
...
...
@@ -35,6 +35,7 @@
#include "wine/windef16.h"
#include "winerror.h"
#include "winbase.h"
#include "wine/unicode.h"
#include "rpc.h"
#include "ole2.h"
...
...
@@ -64,6 +65,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
static
UUID
uuid_nil
;
/***********************************************************************
* RPCRT4_LibMain
*
...
...
@@ -92,6 +95,60 @@ RPCRT4_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
/*************************************************************************
* UuidEqual [RPCRT4.@]
*
* PARAMS
* UUID *Uuid1 [I] Uuid to compare
* UUID *Uuid2 [I] Uuid to compare
* RPC_STATUS *Status [O] returns RPC_S_OK
*
* RETURNS
* TRUE/FALSE
*/
int
WINAPI
UuidEqual
(
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
TRUE
;
return
!
memcmp
(
uuid1
,
uuid2
,
sizeof
(
UUID
));
}
/*************************************************************************
* UuidIsNil [RPCRT4.@]
*
* PARAMS
* UUID *Uuid [I] Uuid to compare
* RPC_STATUS *Status [O] retuns RPC_S_OK
*
* RETURNS
* TRUE/FALSE
*/
int
WINAPI
UuidIsNil
(
UUID
*
uuid
,
RPC_STATUS
*
Status
)
{
TRACE
(
"(%s)
\n
"
,
debugstr_guid
(
uuid
));
*
Status
=
RPC_S_OK
;
if
(
!
uuid
)
return
TRUE
;
return
!
memcmp
(
uuid
,
&
uuid_nil
,
sizeof
(
UUID
));
}
/*************************************************************************
* UuidCreateNil [RPCRT4.@]
*
* PARAMS
* UUID *Uuid [O] returns a nil UUID
*
* RETURNS
* RPC_S_OK
*/
RPC_STATUS
WINAPI
UuidCreateNil
(
UUID
*
Uuid
)
{
*
Uuid
=
uuid_nil
;
return
RPC_S_OK
;
}
/*************************************************************************
* UuidCreate [RPCRT4.@]
*
* Creates a 128bit UUID.
...
...
@@ -109,11 +166,11 @@ RPC_STATUS WINAPI UuidCreate(UUID *Uuid)
static
unsigned
char
a
[
6
];
static
int
adjustment
=
0
;
static
struct
timeval
last
=
{
0
,
0
};
static
UINT16
clock_seq
;
static
WORD
clock_seq
;
struct
timeval
tv
;
unsigned
long
long
clock_reg
;
UINT
clock_high
,
clock_low
;
UINT16
temp_clock_seq
,
temp_clock_mid
,
temp_clock_hi_and_version
;
DWORD
clock_high
,
clock_low
;
WORD
temp_clock_seq
,
temp_clock_mid
,
temp_clock_hi_and_version
;
#ifdef HAVE_NET_IF_H
int
sd
;
struct
ifreq
ifr
,
*
ifrp
;
...
...
@@ -252,7 +309,7 @@ sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
clock_high
=
clock_reg
>>
32
;
clock_low
=
clock_reg
;
temp_clock_seq
=
clock_seq
|
0x8000
;
temp_clock_mid
=
(
UINT16
)
clock_high
;
temp_clock_mid
=
(
WORD
)
clock_high
;
temp_clock_hi_and_version
=
(
clock_high
>>
16
)
|
0x1000
;
/* pack the information into the GUID structure */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment