Commit Graph

148 Commits

Author SHA1 Message Date
Zebediah Figura 352a64cbbc rpcrt4: Bump the maximum accepted NDR version.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45699
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:45:47 +02:00
Zebediah Figura 36c5adca37 rpcrt4: Implement Ndr64AsyncClientCall().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45699
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:45:44 +02:00
Zebediah Figura 9369aea260 rpcrt4: Implement NdrClientCall3().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45699
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:45:41 +02:00
Zebediah Figura ff7f92c0b0 rpcrt4: Handle FC_NON_ENCAPSULATED_UNION in calc_arg_size().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45699
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 10:45:38 +02:00
Alexandre Julliard d9adc902f8 rpcrt4: Add stubless proxy support for ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-27 13:26:52 +02:00
Dmitry Timoshkov 306e14b956 rpcrt4: Perform the INITOUT phase in NdrAsyncServerCall instead of RpcAsyncCompleteCall.
This is required to correctly support out reference parameters,
otherwise server method receives not initialized pointers during
the CALLSERVER phase and crashes.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 12:56:59 +02:00
Dmitry Timoshkov ccbfad5ea7 rpcrt4: Implement RpcAsyncCompleteCall for server side.
Based on NdrStubCall2 implementation.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +02:00
Dmitry Timoshkov 29fa835687 rpcrt4: Implement NdrAsyncServerCall.
Based on NdrStubCall2 and NdrAsyncClientCall implementations.

In order to test asynchronous RPC I used dlls/rpcrt4/tests/server.c as a base,
converted int_return() and sum() to use asynchronous RPC on both client and
server sides (server.idl doesn't need any changes), and added server.acf:
interface IServer
{
    [async] int_return();
    [async] sum();
}
With this implementation these tests pass under Wine. Since widl doesn't
support asynchronous RPC it's impossible to add appropriate Wine tests.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 16:50:44 +02:00
Dmitry Timoshkov 0c2f5f8b15 rpcrt4: Return an exception code from NdrAsyncClientCall.
Otherwise the caller may decide to wait for the call termination which
will never happen.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-02 20:47:31 +02:00
Dmitry Timoshkov 1df0091dac rpcrt4: Add an exception handler to NdrAsyncClientCall.
NdrClientCall already uses TRY/EXCEPT block if the procedure has
Oi_HAS_COMM_OR_FAULT in its Oi_flags, I've added similar block
to NdrAsyncClientCall but without mapping the fault code using
CommFaultOffsets because NdrAsyncClientCall doesn't have this
implemented.

An installer that I have here calls NdrAsyncClientCall in order
to query status of a not yet installed service, and that leads
to a crash due to RaiseException from inside of NdrAsyncClientCall.
With this patch it no longer crashes on an unhandled exception,
and then installs the service.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-28 18:18:56 +02:00
Alexandre Julliard 7592b406d2 rpcrt4: Add .seh annotations for x86_64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 11:56:13 +02:00
Alexandre Julliard eadb037ba1 rpcrt4: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:22:47 +02:00
Zebediah Figura 9271efc0c7 rpcrt4: Use a FINALLY block to clean up in do_ndr_client_call().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Zebediah Figura ae5f2a8f84 rpcrt4: Handle exceptions in a larger portion of NdrClientCall().
Most notably in NdrProxyInitialize().

This patch and the next bring the scope of exception handling roughly in line
with -Os stubs.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36981
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Zebediah Figura 40b6adf8f0 rpcrt4: Factor out get_handle_desc_size().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Louis Lenders e54224e88c rpcrt4: Add NdrServerCallAll stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47131
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 09:17:42 -05:00
Jacek Caban b6c48de699 rpcrt4: Fix context handle return value marshaling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 23:09:07 +01:00
Zebediah Figura be25106503 rpcrt4: Also clear base-type [out] pointers in client_do_args().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 13:55:22 +02:00
Zebediah Figura 43275fb178 rpcrt4: Avoid clearing a NULL output parameter in client_do_args().
Avoids an unhandled exception. Passing NULL as a ref pointer (which a
top-level [out] parameter necessarily is) is illegal, but this will be caught
in the CALCSIZE pass. This matches midl/widl behaviour in the -Os case.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-12 09:48:37 +02:00
Zebediah Figura 5be461cd71 rpcrt4: Correctly handle simple ref pointers in calc_arg_size().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-12 09:48:35 +02:00
Zebediah Figura be9f5f4aaf rpcrt4: Handle non-ref pointers in calc_arg_size().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-12 09:48:33 +02:00
Zebediah Figura 69cd52875a rpcrt4: Use publicly defined NDR constants.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 09:53:07 +02:00
Huw Davies b2667416c2 rpcrt4: Don't free the argument if the freer was called, unless it's a simple ref.
In the simple reference case the freer will not see the top-level
pointer, so we need to free that here.

This fixes a double-free caused by commit 614afcefa3.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:21:36 +01:00
Alexandre Julliard aea6d2371d rpcrt4: Mark function that are only called from assembly as hidden.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 11:48:54 +02:00
Nikolay Sivov 858064abf6 rpcrt4: Added NdrAsyncServerCall stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 12:02:05 +09:00
Piotr Caban 614afcefa3 rpcrt4: Free server side arguments with MustFree flag first so other arguments may be used to determine its size.
This also fixes a leak when both MustFree and ServerAllocSize flags are
specified.
2015-09-08 14:49:21 +09:00
André Hentschel ef783d62cc rpcrt4: Add ARM support. 2015-08-17 16:59:23 +09:00
Huw Davies 173ae68f0b rpcrt4: Procedures containing a range within a conformance have a larger correlation descriptor. 2015-07-13 22:11:42 +09:00
Huw Davies a8f46c78ff rpcrt4: Add missing calls to NdrCorrelationInitialize/Free. 2015-07-13 22:11:27 +09:00
Josh DuBois 1f34f193b6 rpcrt4: Avoid movs between rcx, rdx and xmm registers.
Apple's version of as chokes on movs between rcx and rdx and the xmm
registers.
2015-05-06 20:45:41 +09:00
Nikolay Sivov ecda8fd501 rpcrt4: Added inline helper to test for Oicf stub descriptions. 2015-03-06 20:40:44 +09:00
Nikolay Sivov 2b40f9b01e rpcrt4: Implement RPC_FC_CALLBACK_HANDLE handle type for NdrClientCall2(). 2015-03-06 12:57:03 +09:00
Nikolay Sivov 0810db96fa rpcrt4: Use RPC_* error code names. 2015-03-03 20:32:06 +09:00
André Hentschel c60a0b857d rpcrt4: Fix copy-paste error (coverity). 2012-10-24 19:39:01 +02:00
Thomas Faber 25b76525f3 rpcrt4: Match MSVC version of call_server_func with GCC. 2012-09-24 22:27:26 +02:00
André Hentschel fc2c0160fb rpcrt4: Avoid shadowing pProcHeader. 2012-04-30 20:03:28 +02:00
Francois Gouget e9e0507d2b rpcrt4: An interface pointer just has the size of a regular pointer. 2011-11-16 17:01:49 +01:00
Francois Gouget 97ba7aa521 rpcrt4: The offset to the complex pointer's description is signed. 2011-11-16 09:47:16 +01:00
Henri Verbeet f687728c43 rpcrt4: Properly size complex reference pointers. 2011-09-23 12:35:17 +02:00
Francois Gouget c992ca277d Assorted spelling fixes. 2011-08-24 19:07:46 +02:00
Frédéric Delanoy 7e309601f3 dlls: Assorted spelling fixes. 2011-08-03 14:15:50 +02:00
Alexandre Julliard 976cd5c9fe rpcrt4: Support sizing of a few more argument types. 2011-07-29 12:08:52 +02:00
Alexandre Julliard 2bdff69733 rpcrt4: Add a phase in proxies for zeroing output parameters on startup. 2011-07-28 23:10:20 +02:00
Alexandre Julliard a37ec01bd1 rpcrt4: Add a phase in proxies for clearing output parameters on error. 2011-07-28 23:09:53 +02:00
Alexandre Julliard 78e8fccbd6 rpcrt4: Use the same phase values for clients and stubs. 2011-07-28 23:07:21 +02:00
Alexandre Julliard f3734fd687 rpcrt4: Pass the full argument format to the size/marshall/unmarshall wrappers to greatly simplify the argument processing. 2011-07-28 22:13:49 +02:00
Alexandre Julliard ad7cb0cf6c rpcrt4: Convert old-style arguments for stub calls. 2011-07-28 17:48:19 +02:00
Alexandre Julliard 348f00e116 rpcrt4: Convert old-style arguments for NdrMesProcEncodeDecode. 2011-07-28 17:30:40 +02:00
Alexandre Julliard e8e3a2da83 rpcrt4: Convert old-style argument formats to new style so that the client call implementation can be shared. 2011-07-28 16:54:01 +02:00