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
4194daf1
Commit
4194daf1
authored
Mar 26, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Support using context handles as the binding handle in client functions.
parent
35d7f706
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
client.c
tools/widl/client.c
+27
-3
No files found.
tools/widl/client.c
View file @
4194daf1
...
...
@@ -70,6 +70,20 @@ static void check_pointers(const func_t *func)
}
}
const
var_t
*
get_context_handle_var
(
const
func_t
*
func
)
{
const
var_t
*
var
;
if
(
!
func
->
args
)
return
NULL
;
LIST_FOR_EACH_ENTRY
(
var
,
func
->
args
,
const
var_t
,
entry
)
if
(
is_attr
(
var
->
attrs
,
ATTR_IN
)
&&
is_context_handle
(
var
->
type
))
return
var
;
return
NULL
;
}
static
void
write_function_stubs
(
type_t
*
iface
,
unsigned
int
*
proc_offset
)
{
const
func_t
*
func
;
...
...
@@ -85,13 +99,16 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
{
const
var_t
*
def
=
func
->
def
;
const
var_t
*
explicit_handle_var
;
const
var_t
*
context_handle_var
=
NULL
;
int
has_full_pointer
=
is_full_pointer_function
(
func
);
/* check for a defined binding handle */
explicit_handle_var
=
get_explicit_handle_var
(
func
);
if
(
!
explicit_handle_var
)
context_handle_var
=
get_context_handle_var
(
func
);
if
(
explicit_handle
)
{
if
(
!
explicit_handle_var
)
if
(
!
explicit_handle_var
||
!
context_handle_var
)
{
error
(
"%s() does not define an explicit binding handle!
\n
"
,
def
->
name
);
return
;
...
...
@@ -131,7 +148,7 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
fprintf
(
client
,
" _RetVal;
\n
"
);
}
if
(
implicit_handle
||
explicit_handle_var
)
if
(
implicit_handle
||
explicit_handle_var
||
context_handle_var
)
print_client
(
"RPC_BINDING_HANDLE _Handle = 0;
\n
"
);
print_client
(
"RPC_MESSAGE _RpcMessage;
\n
"
);
...
...
@@ -172,6 +189,13 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
print_client
(
"_Handle = %s;
\n
"
,
explicit_handle_var
->
name
);
fprintf
(
client
,
"
\n
"
);
}
else
if
(
context_handle_var
)
{
print_client
(
"if (%s%s != 0)
\n
"
,
is_ptr
(
context_handle_var
->
type
)
?
"*"
:
""
,
context_handle_var
->
name
);
indent
++
;
print_client
(
"_Handle = NDRCContextBinding(%s%s);
\n
"
,
is_ptr
(
context_handle_var
->
type
)
?
"*"
:
""
,
context_handle_var
->
name
);
indent
--
;
}
write_remoting_arguments
(
client
,
indent
,
func
,
PASS_IN
,
PHASE_BUFFERSIZE
);
...
...
@@ -179,7 +203,7 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
indent
++
;
print_client
(
"(PMIDL_STUB_MESSAGE)&_StubMsg,
\n
"
);
print_client
(
"_StubMsg.BufferLength,
\n
"
);
if
(
implicit_handle
||
explicit_handle_var
)
if
(
implicit_handle
||
explicit_handle_var
||
context_handle_var
)
print_client
(
"_Handle);
\n
"
);
else
print_client
(
"%s__MIDL_AutoBindHandle);
\n
"
,
iface
->
name
);
...
...
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