Commit Graph

1531 Commits

Author SHA1 Message Date
Zebediah Figura 15e91ac2ce rpcrt4: Handle bare coclasses as top-level parameters.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:04:41 +01:00
Zebediah Figura f4ee83c0eb rpcrt4: Handle bare interfaces as top-level parameters.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:04:38 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Serge Gautherie 57f08ba525 rpcrt4/tests: Remove now useless forced 0x0500 API versions.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:27:16 +01:00
Serge Gautherie aa384d3642 tools: Remove 0x0501 API versions forced by winapi_test.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 20:10:44 +01:00
Jacek Caban c041605b00 guiddef.h: Remove GUID_NULL declaration.
It's declared in cguid.h with proper extern "C".

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Jacek Caban 1980fcafe1 rpcrt4: Use MustFree for all non-base types in get_param_pointer_info.
Fixes a leak for VT_VARIANT.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 22:34:12 +01:00
Zebediah Figura 76238898fc rpcrt4: Use a critical section for the context handle lock.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 19:30:00 +01:00
Kevin Puetz a09c08f17a rpcrt4: Fix ITypeInfo leak in get_iface_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 16:32:03 +01:00
Zebediah Figura c2b4d98f23 rpcrt4/tests: Pass the default maximum call limit to RpcServerListen().
The tests intermittently crash on 2008 with RPC_S_SERVER_TOO_BUSY.  I suspect
this is due to the server spawned in run_server having a call limit of 20 but
being expected to service 32 threads.  Use the default parameter in an attempt
to prevent this failure.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-15 22:03:36 +01:00
Jacek Caban f64832fe6a rpcrt4: Support VT_BSTR in get_param_pointer_info.
Fixes a leak in typelib marshaller.
Based on patch by Kevin Puetz.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-19 18:38:22 +01:00
Jacek Caban 1aaf870039 rpcrt4: Fix implicit in attribute handling in write_param_fs.
Fixes regression caused by typelib marshaling rewrite.
Spotted by Kevin Puetz.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-18 21:13:16 +01:00
Zebediah Figura 53efccdb65 rpcrt4: Fix ITypeInfo ref count handling.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
André Hentschel 6127c688ea rpcrt4: Fix RpcNetworkIsProtseqValid[AW] spec file entries.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:44:57 +01:00
Alexandre Julliard 822e2773d4 rpcrt4/tests: Increase some timeouts.
These are too short when running under QEMU.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 00:33:46 +01: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 a6fe4f6e65 rpcrt4: Reimplement rpcrt4_conn_np_wait_for_incoming_data() using asynchronous read with zero sized buffer.
The problem with NtFsControlFile(FSCTL_PIPE_PEEK) is that it happily returns
STATUS_SUCCESS with 0 bytes of data available. That makes the client think
that the server already sent a reply and try to read the reply data, which
hangs. A solution to this is call NtReadFile() with zero sized buffer, which
has correct behaviour: just waits for incoming data to appear without mangling
the data in the pipe.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 20:09:14 +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 07ee2a7d82 rpcrt4: Remove FIXME about RPC_CONTEXT_HANDLE_FLAGS from NDRSContextMarshall2 and NDRSContextUnmarshall2.
RPC_CONTEXT_HANDLE_FLAGS contain the values RPC_CONTEXT_HANDLE_SERIALIZE
or RPC_CONTEXT_HANDLE_DONT_SERIALIZE, however all the calls to underlying
binding->Assoc are guarded by a critical section, so it's redundant to
take any action about passed in Flags parameter.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 12:23:42 +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 bb7c119190 rpcrt4: Implement wait_for_incoming_data() for named pipes transport.
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
André Hentschel 660ee356e9 rpcrt4: Fix NdrServerContextMarshall spec file entry.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:23:50 +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
Zebediah Figura 8f690d5125 rpcrt4: Fail with CO_E_OBJNOTCONNECTED when trying to call methods on a disconnected proxy.
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
Michael Stefaniuc fb4a77d5c6 rpcrt4: Use CONTAINING_RECORD instead of an extra macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:19:24 -05: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
Louis Lenders bc1b56ad18 rpcrt4: Quiet two noisy fixme`s.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:04:50 +02:00
Zebediah Figura 3fd7a32a01 rpcrt4: Properly handle complex arrays in the typelib marshaller.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-02 09:08:05 +02:00
Zebediah Figura ad2cba9d84 rpcrt4: Write type format strings for complex structs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46378
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:32 +02:00
Zebediah Figura 46e51ef776 rpcrt4: Write parameters for fixed structs.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:32 +02:00
Zebediah Figura 583dca9d72 rpcrt4: Improve struct type detection.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:32 +02:00
Zebediah Figura 81745dfd08 rpcrt4: Abort if an interface is passed directly to write_type_tfs().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:32 +02:00
Zebediah Figura c73988178f rpcrt4: Handle TKIND_ALIAS in more places.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:32 +02:00
Zebediah Figura 7eb6708251 rpcrt4: Factor out type_pointer_is_iface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:31 +02:00
Zebediah Figura d97b421b92 rpcrt4: Detect enums and aliases in get_base_type().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 21:54:31 +02:00
Jacek Caban 994976dcb3 rpcrt4/tests: Avoid type redefinition.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46680
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:57:59 +01:00
Jacek Caban 83b9438029 widl: Fix handling context handle return type in mixed mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-30 18:32:36 +01:00
Jacek Caban 78d75e4a22 rpcrt4/tests: Add context handle marshaling tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 23:09:08 +01:00
Jacek Caban 464ba54b4c rpcrt4: Fix context handle return value unmarshaling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 23:09:07 +01: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
Jacek Caban f634a84fda rpcrt4/tests: Use --prefix-client to avoid duplicated function implementations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 16:25:58 +01:00
Jacek Caban d73a6bae08 rpcrt4/tests: Run RPC tests in both mixed and fully interpreted mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:42:44 +01:00