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
48be9c6e
Commit
48be9c6e
authored
Dec 24, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Dec 24, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix definitions for Uuid{To,From}String, RpcStringFree.
parent
e25ab1fa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
34 deletions
+34
-34
cpsf.c
dlls/rpcrt4/cpsf.c
+8
-8
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+13
-13
rpcrt4_main.c
dlls/rpcrt4/rpcrt4_main.c
+6
-6
rpc.c
dlls/rpcrt4/tests/rpc.c
+1
-1
rpcdce.h
include/rpcdce.h
+6
-6
No files found.
dlls/rpcrt4/cpsf.c
View file @
48be9c6e
...
...
@@ -160,7 +160,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
HKEY
key
,
subkey
;
TRACE
(
"(%p,%p,%s)
\n
"
,
hDll
,
pProxyFileList
,
debugstr_guid
(
pclsid
));
UuidToStringA
((
UUID
*
)
pclsid
,
&
clsid
);
UuidToStringA
((
UUID
*
)
pclsid
,
(
unsigned
char
**
)
&
clsid
);
/* register interfaces to point to clsid */
while
(
*
pProxyFileList
)
{
...
...
@@ -172,9 +172,9 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
TRACE
(
"registering %s %s => %s
\n
"
,
name
,
debugstr_guid
(
proxy
->
header
.
piid
),
clsid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
&
iid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
(
unsigned
char
**
)
&
iid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"Interface
\\
%s"
,
iid
);
RpcStringFreeA
(
&
iid
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
iid
);
if
(
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
keyname
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
key
,
NULL
)
==
ERROR_SUCCESS
)
{
if
(
name
)
...
...
@@ -205,7 +205,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
}
/* done */
RpcStringFreeA
(
&
clsid
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
clsid
);
return
S_OK
;
}
...
...
@@ -220,7 +220,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
char
keyname
[
120
],
module
[
120
];
TRACE
(
"(%p,%p,%s)
\n
"
,
hDll
,
pProxyFileList
,
debugstr_guid
(
pclsid
));
UuidToStringA
((
UUID
*
)
pclsid
,
&
clsid
);
UuidToStringA
((
UUID
*
)
pclsid
,
(
unsigned
char
**
)
&
clsid
);
/* unregister interfaces */
while
(
*
pProxyFileList
)
{
...
...
@@ -232,9 +232,9 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
TRACE
(
"unregistering %s %s <= %s
\n
"
,
name
,
debugstr_guid
(
proxy
->
header
.
piid
),
clsid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
&
iid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
(
unsigned
char
**
)
&
iid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"Interface
\\
%s"
,
iid
);
RpcStringFreeA
(
&
iid
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
iid
);
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
keyname
);
}
pProxyFileList
++
;
...
...
@@ -247,6 +247,6 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
keyname
);
/* done */
RpcStringFreeA
(
&
clsid
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
clsid
);
return
S_OK
;
}
dlls/rpcrt4/rpc_binding.c
View file @
48be9c6e
...
...
@@ -595,11 +595,11 @@ RPC_STATUS WINAPI RpcStringBindingParseA( LPSTR StringBinding, LPSTR *ObjUuid,
return
RPC_S_OK
;
fail:
if
(
ObjUuid
)
RpcStringFreeA
(
ObjUuid
);
if
(
Protseq
)
RpcStringFreeA
(
Protseq
);
if
(
NetworkAddr
)
RpcStringFreeA
(
NetworkAddr
);
if
(
Endpoint
)
RpcStringFreeA
(
Endpoint
);
if
(
Options
)
RpcStringFreeA
(
Options
);
if
(
ObjUuid
)
RpcStringFreeA
(
(
unsigned
char
**
)
ObjUuid
);
if
(
Protseq
)
RpcStringFreeA
(
(
unsigned
char
**
)
Protseq
);
if
(
NetworkAddr
)
RpcStringFreeA
(
(
unsigned
char
**
)
NetworkAddr
);
if
(
Endpoint
)
RpcStringFreeA
(
(
unsigned
char
**
)
Endpoint
);
if
(
Options
)
RpcStringFreeA
(
(
unsigned
char
**
)
Options
);
return
RPC_S_INVALID_STRING_BINDING
;
}
...
...
@@ -771,11 +771,11 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingA( LPSTR StringBinding, RPC_BINDING
if
(
ret
==
RPC_S_OK
)
ret
=
RPCRT4_CompleteBindingA
(
bind
,
NetworkAddr
,
Endpoint
,
Options
);
RpcStringFreeA
(
&
Options
);
RpcStringFreeA
(
&
Endpoint
);
RpcStringFreeA
(
&
NetworkAddr
);
RpcStringFreeA
(
&
Protseq
);
RpcStringFreeA
(
&
ObjectUuid
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
Options
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
Endpoint
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
NetworkAddr
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
Protseq
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
ObjectUuid
);
if
(
ret
==
RPC_S_OK
)
*
Binding
=
(
RPC_BINDING_HANDLE
)
bind
;
...
...
@@ -835,13 +835,13 @@ RPC_STATUS WINAPI RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding, LPSTR*
TRACE
(
"(%p,%p)
\n
"
,
Binding
,
StringBinding
);
ret
=
UuidToStringA
(
&
bind
->
ObjectUuid
,
&
ObjectUuid
);
ret
=
UuidToStringA
(
&
bind
->
ObjectUuid
,
(
unsigned
char
**
)
&
ObjectUuid
);
if
(
ret
!=
RPC_S_OK
)
return
ret
;
ret
=
RpcStringBindingComposeA
(
ObjectUuid
,
bind
->
Protseq
,
bind
->
NetworkAddr
,
bind
->
Endpoint
,
NULL
,
StringBinding
);
RpcStringFreeA
(
&
ObjectUuid
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
ObjectUuid
);
return
ret
;
}
...
...
@@ -856,7 +856,7 @@ RPC_STATUS WINAPI RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, LPWSTR
TRACE
(
"(%p,%p)
\n
"
,
Binding
,
StringBinding
);
ret
=
RpcBindingToStringBindingA
(
Binding
,
&
str
);
*
StringBinding
=
RPCRT4_strdupAtoW
(
str
);
RpcStringFreeA
(
&
str
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
str
);
return
ret
;
}
...
...
dlls/rpcrt4/rpcrt4_main.c
View file @
48be9c6e
...
...
@@ -190,7 +190,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
* S_OK if successful.
*/
RPC_STATUS
WINAPI
RpcStringFreeA
(
LPSTR
*
String
)
RPC_STATUS
WINAPI
RpcStringFreeA
(
unsigned
char
*
*
String
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
String
);
...
...
@@ -206,7 +206,7 @@ RPC_STATUS WINAPI RpcStringFreeA(LPSTR* String)
*
* S_OK if successful.
*/
RPC_STATUS
WINAPI
RpcStringFreeW
(
LPWSTR
*
String
)
RPC_STATUS
WINAPI
RpcStringFreeW
(
unsigned
short
*
*
String
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
String
);
...
...
@@ -545,7 +545,7 @@ unsigned short WINAPI UuidHash(UUID *uuid, RPC_STATUS *Status)
* S_OK if successful.
* S_OUT_OF_MEMORY if unsucessful.
*/
RPC_STATUS
WINAPI
UuidToStringA
(
UUID
*
Uuid
,
LPSTR
*
StringUuid
)
RPC_STATUS
WINAPI
UuidToStringA
(
UUID
*
Uuid
,
unsigned
char
*
*
StringUuid
)
{
*
StringUuid
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
char
)
*
37
);
...
...
@@ -571,7 +571,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, LPSTR* StringUuid)
* S_OK if successful.
* S_OUT_OF_MEMORY if unsucessful.
*/
RPC_STATUS
WINAPI
UuidToStringW
(
UUID
*
Uuid
,
LPWSTR
*
StringUuid
)
RPC_STATUS
WINAPI
UuidToStringW
(
UUID
*
Uuid
,
unsigned
short
*
*
StringUuid
)
{
char
buf
[
37
];
...
...
@@ -605,7 +605,7 @@ static const BYTE hex2bin[] =
/***********************************************************************
* UuidFromStringA (RPCRT4.@)
*/
RPC_STATUS
WINAPI
UuidFromStringA
(
LPSTR
str
,
UUID
*
uuid
)
RPC_STATUS
WINAPI
UuidFromStringA
(
unsigned
char
*
str
,
UUID
*
uuid
)
{
BYTE
*
s
=
(
BYTE
*
)
str
;
int
i
;
...
...
@@ -646,7 +646,7 @@ RPC_STATUS WINAPI UuidFromStringA(LPSTR str, UUID *uuid)
/***********************************************************************
* UuidFromStringW (RPCRT4.@)
*/
RPC_STATUS
WINAPI
UuidFromStringW
(
LPWSTR
s
,
UUID
*
uuid
)
RPC_STATUS
WINAPI
UuidFromStringW
(
unsigned
short
*
s
,
UUID
*
uuid
)
{
int
i
;
...
...
dlls/rpcrt4/tests/rpc.c
View file @
48be9c6e
...
...
@@ -86,7 +86,7 @@ void UuidConversionAndComparison(void) {
/* Uuid to String to Uuid (char) */
for
(
i1
=
0
;
i1
<
10
;
i1
++
)
{
Uuid1
=
Uuid_Table
[
i1
];
ok
(
(
UuidToStringA
(
&
Uuid1
,
&
str
)
==
RPC_S_OK
),
"Simple UUID->String copy"
);
ok
(
(
UuidToStringA
(
&
Uuid1
,
(
unsigned
char
**
)
&
str
)
==
RPC_S_OK
),
"Simple UUID->String copy"
);
ok
(
(
UuidFromStringA
(
str
,
&
Uuid2
)
==
RPC_S_OK
),
"Simple String->UUID copy from generated UUID String"
);
ok
(
UuidEqual
(
&
Uuid1
,
&
Uuid2
,
&
rslt
),
"Uuid -> String -> Uuid transform"
);
/* invalid uuid tests -- size of valid UUID string=36 */
...
...
include/rpcdce.h
View file @
48be9c6e
...
...
@@ -250,21 +250,21 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
#define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringFreeA
(
LPSTR
*
String
);
RpcStringFreeA
(
unsigned
char
*
*
String
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
RpcStringFreeW
(
LPWSTR
*
String
);
RpcStringFreeW
(
unsigned
short
*
*
String
);
#define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
RPCRTAPI
RPC_STATUS
RPC_ENTRY
UuidToStringA
(
UUID
*
Uuid
,
LPSTR
*
StringUuid
);
UuidToStringA
(
UUID
*
Uuid
,
unsigned
char
*
*
StringUuid
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
UuidToStringW
(
UUID
*
Uuid
,
LPWSTR
*
StringUuid
);
UuidToStringW
(
UUID
*
Uuid
,
unsigned
short
*
*
StringUuid
);
#define UuidToString WINELIB_NAME_AW(UuidToString)
RPCRTAPI
RPC_STATUS
RPC_ENTRY
UuidFromStringA
(
LPSTR
StringUuid
,
UUID
*
Uuid
);
UuidFromStringA
(
unsigned
char
*
StringUuid
,
UUID
*
Uuid
);
RPCRTAPI
RPC_STATUS
RPC_ENTRY
UuidFromStringW
(
LPWSTR
StringUuid
,
UUID
*
Uuid
);
UuidFromStringW
(
unsigned
short
*
StringUuid
,
UUID
*
Uuid
);
#define UuidFromString WINELIB_NAME_AW(UuidFromString)
RPCRTAPI
RPC_STATUS
RPC_ENTRY
...
...
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