Rob Shearman
efda021c5d
Revert "rpcrt4: The get_ranged_enum test doesn't work on Windows, so don't execute it for the moment.".
...
This reverts commit 81036cc51831db03f8e0eb03b5f74ae5099461cd.
2009-11-12 14:18:27 +01:00
Rob Shearman
03f87bc1c3
rpcrt4: Replace sizeofs with FIELD_OFFSET in RPCRT4_BuildBindNackHeader to avoid relying on ANYSIZE_ARRAY being 1.
2009-11-12 13:15:37 +01:00
Rob Shearman
a638bff53d
rpcrt4: Stop searching through transfer syntaxes in process_bind_packet when one has been found.
...
Fixes Valgrind errors in various tests using RPC.
2009-11-12 13:13:26 +01:00
Hans Leidekker
59e3d9b5c7
rpcrt4: Implement RpcBindingInqAuthClient{, Ex}.
2009-11-11 11:51:18 +01:00
Rob Shearman
59ba6d2573
rpcrt4: Support multiple interfaces and transfer syntaxes in bind and bind ack messages.
2009-11-11 10:56:13 +01:00
Rob Shearman
7e52896b84
rpcrt4: The get_ranged_enum test doesn't work on Windows, so don't execute it for the moment.
2009-11-11 10:56:09 +01:00
Marcus Meissner
860c87bb1c
rpcrt4: Compare network options correctly (Coverity).
2009-11-10 13:10:14 +01:00
Rob Shearman
97d5f3401d
widl: Add support for varargs functions.
2009-11-09 20:42:27 +01:00
Rob Shearman
2b3659f326
widl: Implement [range] attribute.
2009-11-09 20:34:17 +01:00
Hans Leidekker
444307610e
rpcrt4: Add a test for the ncalrpc protocol sequence.
2009-11-04 13:07:56 +01:00
Hans Leidekker
4b33527f51
rpcrt4: Correct spelling of RPC_C_QOS_IDENTITY_STATIC and RPC_C_QOS_IDENTITY_DYNAMIC.
2009-11-04 13:07:56 +01:00
Alexandre Julliard
c4ebf3687b
rpcrt4: Specify the full application path when starting rpcss.exe.
2009-10-27 11:20:42 +01:00
Huw Davies
da86e727bd
rpcrt4: Move the full pointer table init to after a potential call to NdrServerInitializeNew().
2009-10-26 13:38:10 +01:00
Alexandre Julliard
3b602f5fea
rpcrt4/tests: Fix a double free (Valgrind).
2009-10-22 15:10:58 +02:00
Alexandre Julliard
8ce9b8f1be
rpcrt4/tests: Remove tests for specific values of bit fields.
2009-10-09 16:09:20 +02:00
Ge van Geldorp
55230ba6e0
rpcrt4/tests: Fix cstub test on Win7.
2009-09-24 16:03:31 +02:00
Hans Leidekker
ee7755511b
rpcrt4: Add stub implementations of NdrMesTypeDecode2 and NdrMesTypeFree2.
2009-09-22 16:17:53 +02:00
Francois Gouget
891d3ef525
rpcrt4: Fix compilation on systems that don't support nameless unions.
2009-08-31 12:41:37 +02:00
Francois Gouget
ee7902b283
rpcrt4/tests: Fix compilation on systems that don't support nameless unions.
...
Also omit the nameless union macros from the error messages for clarity.
2009-08-31 12:41:21 +02:00
Juan Lang
d82cbcf049
rpcrt4: Allow Annotation to be NULL.
...
Fixes bug 19760.
--Juan
From afb4d6b943345e19952fe34bd1d8ab4c411563ae Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang@gmail.com>
Date: Wed, 19 Aug 2009 14:27:20 -0700
Subject: [PATCH 3/3] Allow Annotation to be NULL
2009-08-20 15:26:33 +02:00
Alexandre Julliard
e01420d72a
rpcrt4: Assign a unique id to the connection instead of changing it for each message.
2009-08-18 20:15:01 +02:00
Huw Davies
70804336aa
rpcrt4: Add support for FC_ALIGNM2.
2009-08-17 16:47:24 +02:00
Alexandre Julliard
8de0242885
rpcrt4: Replace long and unsigned long by more appropriate types.
2009-07-03 13:42:57 +02:00
Alexandre Julliard
b6efd13ef5
rpcrt4: Add call frame annotations in x86 assembly code.
2009-06-25 12:05:09 +02:00
Alexandre Julliard
b579c48133
rpcrt4: Fix memory sizes of marshalled pointers on 64-bit.
2009-06-19 12:49:35 +02:00
Alexandre Julliard
39d75dfba4
rpcrt4/tests: Fix the marshalling test for Win9x.
2009-06-19 12:49:20 +02:00
Alexandre Julliard
c3c8aa3b23
rpcrt4/tests: Fix the marshalling test for Win64.
2009-06-19 12:38:46 +02:00
Francois Gouget
d51d209b5f
rpcrt4/tests: Replace malloc() with HeapAlloc().
2009-06-15 13:42:29 +02:00
Alexandre Julliard
f2d65b5563
rpcrt4: Add appropriate stdcall decorations to assembly functions.
2009-06-15 13:42:26 +02:00
Alexandre Julliard
c35aa1d46d
rpcrt4: Adjust the start of the proxy virtual table for stubless proxies.
2009-06-10 16:54:30 +02:00
Francois Gouget
47be6e8379
rpcrt4/tests: Make dummy_Release() static.
2009-06-05 14:43:25 +02:00
Alexandre Julliard
cbf9d1b0c6
rpcrt4: Add checks for the number of methods being larger than what we support.
2009-06-03 16:52:06 +02:00
Alexandre Julliard
066060a520
rpcrt4/tests: Add tests for the contents of virtual table for delegated proxies.
2009-06-03 16:51:47 +02:00
Alexandre Julliard
3c9571df78
rpcrt4: Add support for proxy delegation.
2009-06-03 16:51:15 +02:00
Alexandre Julliard
01d00d178e
rpcrt4: Split the vtbl initialization in NdrDllGetClassObject to a separate function.
2009-06-03 16:50:39 +02:00
Alexandre Julliard
449a82866d
rpcrt4: Retrieve the stubless information for the thunks directly from the virtual table pointer.
2009-06-01 21:48:48 +02:00
Alexandre Julliard
acfebea667
rpcrt4: Use the same allocation technique as delegated stubs for the stubless thunks.
...
This avoids allocating them on the heap, and avoids the need for a
separate vtbl.
2009-06-01 21:38:18 +02:00
Alexandre Julliard
ce3c45934b
rpcrt4: Return the stack size from the ObjectStubless function so that the thunks are independent from the number of arguments.
2009-06-01 21:36:12 +02:00
Alexandre Julliard
6f49023802
rpcrt4: Allocate the delegated stubs vtbl only once it is really needed.
2009-06-01 16:55:14 +02:00
Alexandre Julliard
0357ad0894
rpcrt4: Change the allocation of delegated stub methods so that we never need to free them.
2009-06-01 16:40:44 +02:00
Alexandre Julliard
2c1b94bde2
rpcrt4/tests: Fix a few more broken tests on NT4.
2009-06-01 16:16:05 +02:00
Alexandre Julliard
47d927f704
rpcrt4/tests: Disable some tests that crash on Windows.
2009-05-28 22:27:51 +02:00
Alexandre Julliard
05f57146c8
rpcrt4/tests: Remove tests for v1 memory list, the layout is wrong and we don't care about it anyway.
2009-05-28 20:30:05 +02:00
Alexandre Julliard
03b6dcb4a1
rpcrt4/tests: Mark some stub message tests broken for older Windows versions.
...
Group the common tests in a function shared between client and server.
2009-05-28 20:29:51 +02:00
Alexandre Julliard
aded9e4091
rpcrt4: Fix compiler warnings on 64-bit.
2009-05-28 11:56:30 +02:00
Alexandre Julliard
feeaf97c81
rpcrt4: Implement NdrPointerMemorySize and enable the corresponding tests.
2009-05-28 11:52:36 +02:00
Alexandre Julliard
49f1433cdc
rpcrt4/tests: Enable some tests that no longer crash Wine.
2009-05-28 11:41:12 +02:00
Alexandre Julliard
bb18c5ab07
rpcrt4/tests: Comment out a couple of tests that crash on older Windows versions.
2009-05-28 11:38:41 +02:00
Alexandre Julliard
7571c1fd53
rpcrt4: Fix the PSFactoryBuffer proxy refcounting, with tests.
2009-05-27 21:25:10 +02:00
Alexandre Julliard
36965f5726
rpcrt4/tests: Fix a number of 64-bit issues in the ndr_marshall test.
2009-05-27 21:18:35 +02:00
Alexandre Julliard
23e70e00ed
rpcrt4: Internal functions don't need to be WINAPI.
2009-05-27 13:04:33 +02:00
Francois Gouget
ef5f1f5065
rpcrt4: Make RPCRT4_NextHttpHeaderField() and RPCRT4_default_receive_fragment() static.
2009-05-13 12:45:37 +02:00
Francois Gouget
082147d906
rpcrt4: Remove WINAPI on static functions where not needed.
2009-05-06 12:20:10 +02:00
Michael Stefaniuc
3b803f5390
rpcrt4: Replace some usage of the long type.
2009-04-21 13:16:31 +02:00
Paul Vriens
90d3163aba
rpcrt4: Fix NdrDllCanUnloadNow.
2009-04-20 14:14:03 +02:00
Rob Shearman
324b4d0243
rpcrt4: Add a Win32 implementation of ncacn_ip_tcp transport.
2009-04-08 16:01:42 +02:00
Rob Shearman
06c2982a39
rpcrt4: Factor out non-Win32 compatible parts of the ncacn_ip_tcp client code to allow it to be compiled in.
2009-04-08 16:01:34 +02:00
Rob Shearman
ce747f3fac
rpcrt4: Compile in RPC over HTTP support even if HAVE_SOCKETPAIR is not defined.
2009-04-07 14:53:34 +02:00
Rob Shearman
b2a5bfdfc9
rpcrt4: Fix context handle test on Vista upwards.
...
Don't run tests that results in an ERROR_INVALID_HANDLE exception being raised.
Check for the context handle function pointers being non-NULL to
prevent exceptions being raised on platforms without these functions.
2009-04-07 14:22:35 +02:00
Nikolay Sivov
fd3b57c53a
rpcrt4: Implemented RpcEpRegisterW wrapping RpcEpRegisterA.
2009-03-31 12:41:11 +02:00
Rob Shearman
317edfd7da
rpcrt4: Free the memory allocated for the protseq and endpoint strings allocated in RpcServerUseProtseq* functions.
...
Make a copy of the protseq string in alloc_serverprotoseq to simplify
memory management in higher-level functions.
2009-03-30 13:58:01 +02:00
Rob Shearman
4d8057ffef
rpcrt4: RpcServerUseProtseqEp(..., NULL, ...) should return RPC_S_OK.
...
However, on some buggy platforms it returns
RPC_S_INVALID_ENDPOINT_FORMAT. Don't follow this behaviour our
implementation of the API.
2009-03-30 13:57:54 +02:00
Austin English
f8f4c4ef43
rpcrt4/test: Change a skip to win_skip.
2009-03-26 16:13:33 +01:00
Rob Shearman
524a99a2da
rpcrt4: Ensure that only the IP/IPv6 address families are considered in rpcrt4_protseq_ncacn_ip_tcp_open_endpoint/rpcrt4_ncacn_ip_tcp_open.
2009-03-26 16:11:07 +01:00
Rob Shearman
a42d4dbfb6
rpcrt4: Allow listening on dynamically generated ncacn_ip_tcp endpoints.
2009-03-26 16:10:59 +01:00
Rob Shearman
375c68a043
rpcrt4: Re-use already registered endpoints for a protocol sequence.
...
Return RPC_S_INVALID_ENDPOINT_FORMAT if a NULL endpoint is passed into
RpcServerUseProtseqEp{,Ex}{A,W}.
2009-03-26 16:10:49 +01:00
Alexandre Julliard
ce3ce9be8f
rpcrt4: Disable HTTP support if we don't have socketpair and related networking functions.
2009-03-26 14:02:01 +01:00
Huw Davies
eaf4492c70
rpcrt4: Dynamically allocate the buffer if the fixed size one isn't large enough. Don't return an inappropriate error if we fail to get the status text, it's only used for diagnostics.
2009-03-26 11:50:50 +01:00
Rob Shearman
5f6ae94ad0
rpcrt4: Implement RPC over HTTP support.
...
CodeWeavers did this work for supporting the optional HTTP connection
method of Outlook 2003/2007 (must be running with Windows versions set
to XP or higher to see this option).
This was written before Microsoft publicly released a specification
for the RPC over HTTP protocol and so was developed by examining
traffic flowing between a Windows client and an IIS server.
2009-03-25 15:20:52 +01:00
Rob Shearman
834c5b4275
rpcrt4: Implement stubless asynchronous NDR interpreter.
...
CodeWeavers did this work for supporting Outlook 2007.
2009-03-25 15:20:44 +01:00
Rob Shearman
cdf509d71f
rpcrt4: Fix crash when calling RpcServerUseProtseq for ncacn_np and ncalrpc.
...
Add tests for these protocol sequences and for ncacn_ip_tcp.
2009-03-24 13:12:11 +01:00
Rob Shearman
ae5770d366
rpcrt4: Fix a memory leak in union unmarshall functions by never passing fMustAlloc=TRUE into union_arm_unmarshall.
2009-03-23 14:54:29 +01:00
Rob Shearman
1c8c45d0f6
rpcrt4: Implement NdrRangeUnmarshall for enum types.
2009-03-23 14:54:15 +01:00
Rob Shearman
7208067492
rpcrt4: Simplify some code in RpcServerInqBindings by changing while loops into for loops.
2009-03-23 14:54:07 +01:00
Rob Shearman
5e1d10d423
rpcrt4: Free the resources associated with server protocol sequences on DLL unload.
2009-03-23 14:54:01 +01:00
Michael Stefaniuc
efbb4ebf3e
widl: Output "LONG" instead of "long" for a 32bit integer.
...
long is always 32bit in IDL files but that's not true in C.
2009-03-13 11:15:21 +01:00
Alexandre Julliard
85f8f30a65
rpcrt4: Use RpcMsg->Buffer instead of BufferStart since the latter isn't always set.
2009-03-12 13:09:54 +01:00
Rob Shearman
689a49b52a
rpcrt4: Add a check for a NULL ref pointer to NdrPointerUnmarshall.
2009-03-11 10:29:26 +01:00
Rob Shearman
86f79e3a55
rpcrt4: Fix use of uninitialised variable in NdrDllRegisterProxy.
...
It should be key, not subkey being passed into RegSetValueExW.
2009-02-24 16:57:31 +01:00
Francois Gouget
bf855d8696
rpcrt4/tests: Use win_skip() to skip over unimplemented functionality.
2009-02-23 12:21:30 +01:00
Michael Stefaniuc
e3bb1c8243
rpcrt4: Remove superfluous pointer casts.
2009-02-16 16:01:37 +01:00
Juan Lang
76f4b9b053
rpcrt4: Don't abort reading from a pipe if a single read is short.
2009-02-09 12:09:01 +01:00
Rob Shearman
7fe67b159d
rpcrt4: Change the test of CStdStubBuffer->pPSFactory to only test for the field not being NULL.
...
The address varies on older versions of Windows and isn't really important.
2009-02-06 13:03:19 +01:00
Rob Shearman
d3085abc08
Change parameter type from size_t to SIZE_T for MIDL_user_allocate.
2009-02-02 11:55:21 +01:00
Rob Shearman
ff8bd24ec2
rpcrt4: Fix a cstub test failure on older versions of Windows.
2009-01-29 14:07:04 +01:00
Rob Shearman
47adeb0525
rpcrt4: Add tests for NdrGetUserMarshalInfo.
2009-01-28 14:16:19 +01:00
Rob Shearman
78ac42bb1c
rpcrt4: Implement NdrGetUserMarshalInfo.
2009-01-28 14:16:13 +01:00
Rob Shearman
b46f168650
rpcrt4: Don't test for a specific value for fBufferValid in test_client_init.
...
It's not consistent across different Windows versions.
2009-01-28 14:16:01 +01:00
Alexandre Julliard
9876c5433f
rpcrt4: Don't align the buffer pointer in ComplexStructMemorySize for alignment formats.
2009-01-26 15:12:07 +01:00
Rob Shearman
2ec1e4a393
rpcrt4: Fix buffer overflow in UUID tests.
2009-01-26 14:30:47 +01:00
Rob Shearman
bcca81f4f4
rpcrt4: Remove the NDR version check from NdrClientCall2 and NdrStubCall2.
...
It does more harm than good, since we can't get any information about
what new features are being used by the caller, if any, by bailing at
this early point.
2009-01-23 16:14:00 +01:00
Rob Shearman
05063ece28
rpcrt4: Don't declare functions that aren't exported by rpcrt4.dll in include/rpcndr.h.
...
NdrRangeMarshall, NdrRangeBufferSize, NdrRangeFree and
NdrByteCountPointerMemorySize should be declared static in
ndr_marshall.c instead.
2009-01-23 16:13:53 +01:00
Hans Leidekker
7df0a4ecb2
rpcrt4: Move NdrGetUserMarshalInfo stub near user marshal functions. Add documentation header.
2009-01-23 13:40:36 +01:00
Juan Lang
5e5b53666c
rpcrt4: Use pseudo-random numbers to generate UUIDs rather than using the (old, deprecated) MAC-address-and-time generation algorithm.
2009-01-22 15:28:23 +01:00
Hans Leidekker
1de7f2d50c
rpcrt4: Add a stub implementation of NdrGetUserMarshalInfo.
2009-01-21 13:07:30 +01:00
Andrew Talbot
273b40656b
rpcrt4: Declare some functions static.
2009-01-19 13:36:26 +01:00
Francois Gouget
5656e41640
rpcrt4/tests: Add a trailing '\n' to ok() calls.
2009-01-14 14:52:18 +01:00
Ge van Geldorp
a9950e3cee
rpcrt4/tests: Remove NdrVaryingArrayUnmarshall() test, it is broken on Windows.
...
The failures in rpcrt4:server on Windows are caused by an access violation
thrown in NdrVaryingArrayUnmarshall() called from get_5numbers(). I've
created a minimum get_5numbers() test with Microsoft tools and that throws
the same access violation. The access violation disappears when zeroing
out the StubMsg before calling NdrClientInitializeNew(), so my guess is
Windows NdrVaryingArrayUnmarshall() uses an uninitialized member.
2009-01-13 16:39:30 +01:00
Michael Karcher
1c56d293f0
widl: Dereference operator in expr works on any declared pointer.
2009-01-12 16:53:18 +01:00
Rob Shearman
59158fb25c
rpcrt4: Unmarshalling functions should always set fMustAlloc when allocating memory.
...
The memory is uninitialised and so further unmarshalling shouldn't try
to reuse any memory. fMustAlloc is always set to TRUE when allocating
memory so that it is clear that the unmarshalling is safe and to avoid
future problems with change or the code being copied.
2009-01-12 13:07:31 +01:00
Michael Stefaniuc
c171379f47
include: Use ULONG in rpcdcep.h for Win64 compatibility.
2009-01-12 13:06:44 +01:00
Alexandre Julliard
450e9e3adf
rpcrt4/tests: Fix an uninitialized pointer check for Win64.
2009-01-09 18:08:57 +01:00
Alexandre Julliard
9d09985ad1
rpcrt4: Fix an unused value warning on non-i386.
2009-01-08 17:30:09 +01:00
Alexandre Julliard
1639f1e507
rpcrt4/tests: Avoid printing pointer differences in traces.
2009-01-08 13:02:40 +01:00
Francois Gouget
581e390115
winapi_test: The tests don't support WIN64 yet so disable them there.
2009-01-08 12:47:22 +01:00
Francois Gouget
411f5d22c0
winapi_test: The real tests are done at compile time so use C_ASSERT() instead of ok(). Do only one test per line so one can know exactly what went wrong.
2009-01-08 12:46:39 +01:00
Francois Gouget
9f62c9b7a8
winapi_test: Fix TEST_FIELD() so it correctly tests the field size.
2009-01-08 12:44:49 +01:00
Francois Gouget
43c18c1321
winapi_test: FIELD_ALIGNMENT() is redundant so remove it.
2009-01-08 12:43:15 +01:00
Francois Gouget
2e668d2572
winapi_test: Updated so the generated tests work.
2009-01-08 12:42:12 +01:00
Francois Gouget
ada97dc209
Assorted spelling fixes.
2009-01-07 14:41:24 +01:00
Michael Stefaniuc
57ab0cd9a6
include: sspi.h: Use the Win types as per MSDN.
...
This improves the Win64 compatibility.
2009-01-06 12:43:46 +01:00
Michael Stefaniuc
4c7a6694cd
include: Change unsigned long to ULONG in rpcdce.h for Win64 compatibility.
...
Also fix the compiler warnings introduced by this change.
2009-01-04 13:34:51 +01:00
Michael Stefaniuc
e86eb8efa6
include: Change RPC_STATUS from long to LONG for Win64 compatibility.
...
Also fix the compiler warnings introduced by this change.
2009-01-04 13:34:38 +01:00
Alexandre Julliard
8e1b59cb9a
rpcrt4: Disable TCP/IP connection support if we don't have socketpair.
2008-12-22 19:55:05 +01:00
Francois Gouget
6e483affcf
rpcrt4/tests: Fix the trailing '\n' in an ok() call.
2008-12-17 15:27:28 +01:00
Paul Vriens
5021965d2e
rpcrt4/tests: Move function pointer initialization to the init function.
2008-12-16 12:51:16 +01:00
Paul Vriens
1aa9e3846c
rpcrt4/tests: Use GetModuleHandle instead of LoadLibrary.
2008-12-16 12:51:12 +01:00
Alexandre Julliard
42dbdb138a
rpcrt4: Make a variable static.
2008-12-04 12:48:08 +01:00
Alexandre Julliard
797ee403c1
rpcrt4: Create the NumMethods key too when registering an interface.
2008-11-29 13:05:11 +01:00
Alexandre Julliard
ad54700b94
rpcrt4: Use RegDeleteTree to properly unregister interfaces.
2008-11-29 13:02:08 +01:00
Alexandre Julliard
77b3864fed
rpcrt4: Convert the dll registration routines to Unicode.
2008-11-29 13:01:29 +01:00
Francois Gouget
bbc4413548
rpcrt4: Remove WINAPI on static functions where not needed.
2008-11-26 12:10:54 +01:00
Alexandre Julliard
f1d0f81d26
rpcrt4/tests: Fix test failures on Win9x.
2008-11-20 22:44:46 +01:00
Ricardo Filipe
16920c1da7
rpcrt4: Fixed dead increments (llvm/clang).
2008-11-19 12:15:37 +01:00
Andrew Talbot
99ae980c0d
rpcrt4: Sign-compare warnings fix.
2008-11-07 10:56:48 +01:00
Stefan Leichter
79bbddd431
rpcrt4: Add stub for MesEncodeDynBufferHandleCreate.
2008-10-23 12:17:20 +02:00
Alexandre Julliard
83b6c8a5fa
rpcrt4: Convert source files to utf-8.
2008-10-18 19:20:44 +02:00
Juan Lang
a504a79d65
rpcrt4: Add tests for UuidCreate.
2008-10-14 13:41:56 +02:00
Rob Shearman
b919443a58
rpcrt4: The type referred to by the wire_marshal attribute in server.idl must be a pointer.
...
Therefore, declare the structure as user_bstr_t and make wire_bstr_t
be a typedef to a pointer of this type.
2008-10-14 13:41:54 +02:00
Huw Davies
c74de4a1ce
rpcrt4: Actually set an unmarshalled object ptr to NULL when a NULL pointer id is received.
2008-10-02 10:28:19 -05:00
Rob Shearman
62a1beebbf
rpcrt4: Don't call VirtualFree with MEM_RELEASE and non-zero size.
...
The calls fail with ERROR_INVALID_PARAMETER. Instead just call with a
zero size which performs the intended function.
2008-09-23 16:00:05 +02:00
Hans Leidekker
e511474d47
rpcrt4: Add stub implementations for RpcMgmtInqStats and RpcMgmtStatsVectorFree.
2008-09-23 14:03:19 +02:00
Rob Shearman
34dd534250
rpcrt4: Fix memory leak of 0-byte buffer allocated during processing of bind packets.
...
In this case conn->server_binding will be NULL and consequently
bind->Handle will be NULL, causing I_RpcFreeBuffer to fail. Therefore
just use I_RpcFree to free the buffer as that is just what
I_RpcFreeBuffer does under the hood anyway.
2008-09-12 16:49:56 +02:00
Rob Shearman
ffd37b0eec
rpcrt4: Fix memory leaks of hdr in error paths in RPCRT4_io_thread.
2008-09-12 16:49:52 +02:00
Rob Shearman
f12e445ce5
rpcrt4: Don't crash in NdrDllGetClassObject when a NULL pclsid is passed in.
...
Add tests for this.
2008-09-12 16:49:48 +02:00
Rob Shearman
be9909ad1d
rpcrt4: Print error messages from RPC message functions when they are called in an invalid way.
2008-09-12 16:49:45 +02:00
Rob Shearman
8cc3adea52
rpcrt4: Free the memory for a registered interface that is in use and when WaitForCallsToComplete is 0.
2008-09-12 16:49:42 +02:00
Alexandre Julliard
da95db8d5b
rpcrt4/tests: Fix a couple of test failures on Windows.
2008-09-11 14:32:30 +02:00
Paul Vriens
9ee160cf55
rpcrt4/tests: Fix some failures on XP-SP3.
2008-09-11 11:43:14 +02:00
Rob Shearman
a8f7c716ef
rpcrt4: Change type of len parameter of NdrAllocate from size_t to SIZE_T.
...
Use SIZE_T as it matches the size that Windows programs expect whereas
size_t is platform-dependent.
2008-09-08 12:51:37 +02:00
Rob Shearman
f2e47cc2a2
rpcrt4: Fix typo in unescape_string_binding_componentW.
...
string_binding is of type "const WCHAR *" so we shouldn't be calling
strlen on it, we should be calling strlenW on it.
2008-09-08 12:47:20 +02:00
Rob Shearman
170dd5ff8d
rpcrt4: Only start the RpcSs process for handles to the local server.
2008-09-08 12:47:20 +02:00
James Hawkins
bb6a8f36c3
rpcrt4: Fix a failing test in Vista.
2008-09-03 14:21:42 +02:00
James Hawkins
6b20075b1f
rpcrt4: Remove a test that was replaced by a better test.
2008-09-03 13:14:51 +02:00
James Hawkins
080d8e7261
rpcrt4: Fix several test failures in Vista.
2008-08-29 13:24:22 +02:00
Paul Vriens
00662a190d
rpcrt4/tests: Skip ok check for win9x.
2008-08-28 11:24:49 +02:00
Rob Shearman
bce9cd38b0
rpcrt4: Add tests for RpcBindingReset.
2008-08-27 13:21:21 +02:00
Rob Shearman
739d89369b
rpcrt4: Implement RpcBindingReset.
2008-08-19 12:54:31 +02:00
Rob Shearman
e98539520d
rpcrt4: Don't get or create an association for bindings with incomplete endpoints.
...
It's inefficient since the association will have to be replaced before
the binding can be used to connect to a server.
2008-08-19 12:54:26 +02:00
Rob Shearman
6ed020d813
rpcrt4: Check for previous association being NULL in RPCRT4_ResolveBinding.
...
bind->Assoc could be NULL if the binding hasn't been resolved.
2008-08-19 12:54:21 +02:00
Rob Shearman
c5dd3f079c
rpcrt4: Test the endpoint mapper for the ncalrpc protseq as well as the ncacn_np protseq.
2008-08-19 12:25:42 +02:00
Rob Shearman
27ae234b04
rpcrt4: Remove unreachable code in EmbeddedComplexSize.
...
RPC_FC_ERROR_STATUS_T has a value of 0x10 and therefore isn't a
possible value of "flags_type & 0xf" in the switch statement.
2008-08-18 17:34:13 +02:00
Rob Shearman
ef5a5a4490
rpcrt4: Fix RpcStringBindingComposeA/W and RpcStringBindingParseA/W to escape and unescape delimiters in the string binding.
...
This behaviour is stated by the DCE/RPC specification and is also
shown in the rpcrt4 conformance tests.
2008-08-18 14:36:45 +02:00
Rob Shearman
0a5e5a6e5b
rpcrt4: Print a warning if connecting to a named pipe failed in rpcrt4_conn_open_pipe in the !wait case.
2008-08-18 14:36:33 +02:00
Rob Shearman
d2d513db74
rpcrt4: Fix RpcBindingToStringBinding to not generate a UUID string if the object UUID is nil.
2008-08-18 14:36:28 +02:00
Rob Shearman
90bd74081a
rpcrt4: Add test for RpcBindingToStringBindingA.
2008-08-18 14:36:23 +02:00
Rob Shearman
ce085ed8ec
rpcrt4: Check that strings in SMB, NB and pipe floors are nul-terminated before copying the data.
2008-08-18 14:35:43 +02:00
Rob Shearman
1e46fc672a
rpcrt4: Fix the protid used in ncalrpc tower functions.
...
The epm tower for the ncalrpc protseq should have a floor with a
protid of EPM_PROTOCOL_PIPE instead of EPM_PROTOCOL_SMB.
2008-08-18 14:35:26 +02:00
Rob Shearman
498216fc11
rpcrt4: Fix crash in rpcrt4_ncalrpc_parse_top_of_tower due to unconditionally dereferencing networkaddr and endpoint variables.
...
These can be NULL when parts of the tower are not required.
2008-08-18 14:35:21 +02:00
Rob Shearman
54e904e780
rpcrt4: Fix crash calculation of tower size in rpcrt4_ncalrpc_get_top_of_tower.
...
The size depends on the length of the endpoint string, not the network
address string.
2008-08-18 14:35:15 +02:00
Rob Shearman
cdb9625dbd
rpcrt4: Fix a typo in the ncalrpc protseq in the epm_endpoints structure.
2008-08-18 14:35:10 +02:00
Rob Shearman
2652ddfeba
rpcrt4: Re-implement part of the conformant varying structure processing routines using array_* functions.
2008-08-18 14:34:41 +02:00
Rob Shearman
b2305adc3c
rpcrt4: Factorise conformant string functions into array_* functions.
...
This allows conformant string array types to be
marshalled/unmarshalled when embedded in a complex type.
2008-08-18 14:34:40 +02:00
Rob Shearman
9e3260847a
rpcrt4: Factorise conformant varying array functions into array_* functions.
...
This allows conformant varying array types to be
marshalled/unmarshalled when embedded in a complex type.
2008-08-18 14:34:40 +02:00
Rob Shearman
518242ef33
rpcrt4: Add tests for a complex struct with conformant array.
2008-08-18 14:34:40 +02:00
Rob Shearman
9116d73c63
rpcrt4: Factorise conformant array NDR functions and use them to fix the wire-representation of complex structures with conformant arrays.
...
Factorise each conformant array function into the part that deals with
reading, writing or sizing the conformance and another part that deals
with reading, writing or sizing the variance and the element data.
This allows complex structures to use the right wire format where the
conformance appears before the structure data starts.
2008-08-18 14:34:40 +02:00
Rob Shearman
1eaea13ebb
rpcrt4: Validate the uuid portion of the string passed to RpcStringBindingParseA/W.
2008-07-31 13:25:55 +02:00
Francois Gouget
eb16f43bdf
Add some API documentation stubs to make winapi_check happy.
2008-07-28 11:34:45 +02:00
Alexandre Julliard
d96e3964b7
make_makefiles: Explicitly list the Wine headers that should be exported.
2008-07-23 11:40:43 +02:00
Rob Shearman
8af1dba5a9
rpcrt4: Fix the memory pointer passed into the conformant array marshaller in NdrComplexStructMarshall.
...
It needs to be the end of the memory used by the constant part of the
structure, which is returned by CompkexStructMarshall.
2008-07-16 17:54:48 +02:00
Rob Shearman
7551b82cca
rpcrt4: Implement RpcCancelThreadEx.
...
Implement RpcCancelThreadEx using existing code moved into a new
function, rpc_ccancel_thread.
Implement RpcCancelThread based on RpcCancelThreadEx with timeout of 0.
2008-07-14 12:29:46 +02:00
Andrew Talbot
ab6efdd1e4
rpcrt4: Remove unneeded address-of operator from array name.
2008-07-14 11:50:08 +02:00
Rob Shearman
09f343b135
rpcrt4: Ignore the return value of functions when unmarshalling a pickled procedure.
2008-07-14 11:48:25 +02:00
Rob Shearman
2b0ad6e6e7
rpcrt4: Implement MesDecodeBufferHandleCreate and MesEncodeFixedBufferHandleCreate.
2008-07-14 11:48:16 +02:00
Rob Shearman
734094ed2c
rpcrt4: Implement NdrMesProcEncodeDecode.
2008-07-14 11:48:08 +02:00
Rob Shearman
0879041cd2
rpcrt4: Implement MesEncodeIncrementalHandleCreate, MesDecodeIncrementalHandleCreate, MesIncrementalHandleReset and MesHandleFree.
2008-07-14 11:47:46 +02:00
Alexandre Julliard
79c64acc7b
tests: Don't depend on the static uuid libraries in the tests.
...
This avoids trouble with the broken MingW libraries when
cross-compiling the tests.
2008-07-08 17:51:45 +02:00
James Hawkins
490443ed4b
rpcrt4: Fix a test that fails in win2k3.
2008-07-08 10:48:06 +02:00
Alexandre Julliard
6f8749b7bc
rpcrt4: Use interlocked functions to increment/decrement ref counts.
2008-07-07 12:11:24 +02:00
Rob Shearman
b75828fc90
rpcrt4: Clear the memory of embedded complex types in ComplexUnmarshall when fMustAlloc is TRUE to avoid passing uninitialised memory to the unmarshaller.
...
Found by Valgrind.
2008-07-07 12:11:24 +02:00
Rob Shearman
666b57d62f
include: Remove unused file wine/rpcss_shared.h.
2008-07-07 11:11:02 +02:00
Rob Shearman
620d783680
rpcrt4: Don't reserve space in the buffer for reference pointers embedded in complex types.
...
Ref pointers don't need a pointer ID and reserving space would render
the code incompatible with other clients. Note that the pointer
marshalling/unmarshalling functions didn't actually read/write pointer
IDs to/from the reserved space in the buffer.
2008-07-04 19:49:00 +02:00
Rob Shearman
5887be5717
rpcrt4: Implement memory sizing for pointers in complex types.
2008-07-04 19:48:47 +02:00
Rob Shearman
81b4436add
rpcrt4: The conformant array offset in complex structs should be signed.
2008-07-04 19:48:38 +02:00
Rob Shearman
44649e855a
rpcrt4: Fix NdrComplexArrayUnmarshall and NdrComplexStructUnmarshall to reuse memory for embedded pointers.
2008-07-04 19:48:30 +02:00
Rob Shearman
517844e054
rpcrt4: Support calculating the size in memory of range types embedded in complex types.
2008-07-04 19:47:58 +02:00
James Hawkins
d0a8fd48a9
rpcrt4: Fix a failing test in win2k.
2008-07-02 12:17:01 +02:00
Rob Shearman
182a2ae315
rpcrt4: Reset the BufferLength to the used part of the buffer in NdrProxySendReceive.
...
This avoids sending uninitialised data on the wire.
2008-07-02 11:38:37 +02:00
James Hawkins
ee24a372be
rpcrt4: Fix a few failing tests in win2k.
2008-07-01 15:00:08 +02:00
Rob Shearman
456326281d
rpcrt4: Add a comment in NdrSendReceive explaining why we change the BufferLength.
2008-07-01 12:26:37 +02:00
Alexandre Julliard
e213ac9aca
widl: Add some support for unencapsulated unions that need a conformance descriptor.
2008-07-01 12:25:44 +02:00
Detlef Riekenberg
74b78100f3
rpcrt4: Add a stub for I_RpcBindingInqTransportType.
2008-06-26 21:07:22 +02:00
Rob Shearman
1a978cb460
rpcrt4: Add tests for endpoint mapper functions.
2008-06-26 12:20:31 +02:00
Rob Shearman
45a3462c32
rpcrt4/rpcss: Remove old named pipe code for communicating with RPCSS process.
2008-06-26 12:20:24 +02:00
Rob Shearman
9e1c7a30c7
rpcrt4: Use DCE/RPC to contact the endpoint-mapper server.
2008-06-26 12:18:35 +02:00
Rob Shearman
0c095ee0d3
rpcrt4: Fix NdrConformantVaryingStructUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers.
2008-06-23 19:46:29 +02:00
Rob Shearman
33e907bc9d
rpcrt4: Factor out string validation from NDR unmarshalling functions into a separate function, validate_string_data.
2008-06-23 19:46:29 +02:00
Kai Blin
533419cb35
rpcrt4: Ignore the AuthzSvr parameter for RPC_C_AUTHN_WINNT.
2008-06-23 14:04:46 +02:00
Kai Blin
a3bd1f8635
rpcrt4: Fix some A/W use in error messages.
2008-06-23 14:04:44 +02:00
Rob Shearman
f82488823b
rpcrt4: Add test for using a conformant varying structure with pointers.
2008-06-23 14:04:39 +02:00
Rob Shearman
cc199b777e
rpcrt4: Initialise UniquePtrCount in NdrServerInitializeNew.
2008-06-23 12:49:06 +02:00
Rob Shearman
7f1b7c51be
include: Add new bitfields to MIDL_STUB_MESSAGE added in Vista SDKs.
...
Move fBufferValid to a bitfield and update the corresponding tests in rpcrt4.
Add tests for the new fields.
2008-06-23 12:48:59 +02:00
Rob Shearman
4bde42aaa2
rpcrt4: Use abrtitrary pointer identifiers when marshalling pointers instead of using pointer values.
...
This ensures that no information about the server memory layout is
leaked to clients.
2008-06-21 11:12:58 +02:00
Rob Shearman
6cf9e441ad
rpcrt4: Initialise UniquePtrCount in NdrClientInitializeNew.
2008-06-21 11:12:54 +02:00
Rob Shearman
52911fc66c
include: Update the MIDL_STUB_MESSAGE structure.
...
Reduce the size of the IsClient field, as is done in the latest SDKs
to fix NdrClientInitializeNew tests on XP SP3 and Win2003+.
2008-06-19 11:54:49 +02:00
Rob Shearman
6bb26abe81
rpcrt4: Make RpcAssoc_BindConnection use RPCRT4_ReceiveWithAuth instead of RPCRT4_Receive.
...
Move the special handling of the PKT_BIND_ACK packet from
RPCRT4_ReceiveWithAuth to RpcAssoc_BindConnection, where it belongs.
2008-06-19 11:44:28 +02:00
Rob Shearman
6bb03d7dba
rpcrt4: Add new function RPCRT4_ReceiveWithAuth to receive a fragment and return the authentication data received, if any.
2008-06-19 11:44:22 +02:00
Rob Shearman
dec4acd8fe
rpcrt4: Rename RPCRT4_SendAuth to RPCRT4_SendWithAuth.
2008-06-19 11:44:17 +02:00
Rob Shearman
9060d2aaab
Update generated packing tests using current headers.
2008-06-18 15:21:48 +02:00
Rob Shearman
3f92030e2d
rpcrt4: Zero the memory of the s1 structure in test_simple_struct to avoid a Valgrind warning.
2008-06-18 13:50:08 +02:00
Rob Shearman
fd8cb3f9c2
rpcrt4: Reduce the timeout of waiting on the stop event in the server test to one second.
...
The stop event should already be signaled by the time we get to that
point since we wait until the child processes terminate in the server
process and the stop event is signaled in the context of one of the
child processes.
Don't call RpcMgmtWaitServerListening if the call to
WaitForSingleObject failed since it is likely that s_stop() hasn't
been called and therefore the call to RpcMgmtWaitServerListening won't
ever return.
2008-06-18 13:50:01 +02:00
Rob Shearman
9ce356c966
rpcrt4: Save the previous BufferLength in test_ndr_buffer and use it when testing the expected buffer length after the NdrFreeBuffer call.
...
This fixes a test failure on Win2003 upwards when the allocated length
appears to be rounded up to a multiple of 4.
2008-06-18 13:49:56 +02:00
Rob Shearman
c9ef063e12
rpcrt4: Fix ndr_marshall tests to cope with using pointer ids instead of using pointer values.
...
This fixes a number of test failures on XP SP3 and Win2003 upwards.
2008-06-18 13:49:48 +02:00
Rob Shearman
9196337e09
rpcrt4: Clear a hole in the ps1 structure in test_simple_struct.
2008-06-13 10:17:03 +02:00
Rob Shearman
c82ffcec60
rpcrt4: Initialise the array to be marshalled in test_conformant_array.
2008-06-13 10:16:51 +02:00
Paul Vriens
e7ef88beda
rpcrt4/tests: Fix test failures for win9x, NT4, W2K and XP-SP1.
2008-06-12 12:03:30 +02:00
Rob Shearman
a1a5d8d02a
rpcrt4: Use RpcServerRegisterIfEx with RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH in the server test.
...
This allows the test to run correctly on XP SP2 upwards instead of
failing with ERROR_ACCESS_DENIED.
2008-06-10 11:33:21 +02:00
Rob Shearman
d6503215ef
include: Add some missing defines and function declarations to rpcdce.h.
2008-06-10 11:33:13 +02:00
Alexandre Julliard
853db9a79d
rpcrt4: Properly handle the case of a client having disconnected in rpcrt4_conn_listen_pipe.
2008-06-09 12:56:42 +02:00
James Hawkins
3978df4e52
rpcrt4: Trace the results of two statuses that return different results across platforms.
2008-05-26 18:00:08 +02:00
Maarten Lankhorst
fd7b277d8a
rpcrt4: Fix ndr_marshall test failures.
...
Created with help from Robert Shearman.
2008-05-07 20:22:56 +02:00
Rob Shearman
02c66c2312
rpcrt4: Add better traces for the server test.
...
Handle failure to use one or more protocol sequences more gracefully, as
ncacn_np servers aren't support on Win9x and ncacn_ip_tcp fails on some
machines.
2008-05-07 17:48:12 +02:00
Francois Gouget
42a61d7ed7
Assorted spelling fixes.
2008-05-06 16:10:20 +02:00
Alexandre Julliard
dad21bbcbf
makefiles: List the static libraries as normal imports instead of extra libs.
2008-04-30 14:23:55 +02:00
Alexandre Julliard
ef07d83405
Include wine/port.h everywhere we use exceptions.
2008-04-29 20:18:49 +02:00
Rob Shearman
8e08b1dd7f
rpcrt4: Use safe_copy_from_buffer instead of direct memory copy in NdrBaseTypeUnmarshall.
...
This makes the code check that the buffer is big enough to read from
before copying the data from it. The safe_buffer_increment call is still
needed for the case where we point the memory to the buffer, so move the
call there.
2008-04-28 13:28:16 +02:00
Andrew Talbot
649c7aeb7c
rpcrt4: Remove unused variables.
2008-04-25 11:28:34 +02:00
Steven Edwards
d0ddece843
rpcrt4: Correct the number of aguments for fill_method on unsupported architectures.
2008-04-21 18:32:02 +02:00
Austin English
aab8fae59a
Spelling fixes.
2008-04-21 14:25:05 +02:00
Austin English
313a85f163
Spelling fixes.
2008-04-17 12:25:57 +02:00
Marcus Meissner
bd38e2b0ed
rpcrt4: Handle exit path where bind not allocated yet.
2008-04-16 14:12:30 +02:00
Rob Shearman
4efff32291
rpcrt4: Test and fix I_RpcExceptionFilter.
2008-04-16 14:07:31 +02:00
Rob Shearman
e05ccfe2bb
rpcrt4: Add buffer size checks to base type unmarshalling.
...
Reimplement NdrSimpleTypeUnmarshall using similar macros to
NdrBaseTypeUnmarshalling without buffer checks, due to
NdrSimpleTypeUnmarshall not doing any safety checks.
2008-04-14 12:40:22 +02:00
Rob Shearman
9a2914b11f
rpcrt4: Implement I_RpcExceptionFilter.
2008-04-11 12:12:30 +02:00
Rob Shearman
8aeb2858e4
rpcrt4: Add a reference to the binding object in I_RpcNegotiateTransferSyntax and release the reference in I_RpcFreeBuffer.
...
This is needed because a context binding handle could be released on
unmarshall, but it still needs to stay valid until the binding handle is
no longer being used.
Re-use the previously unused RPCRT4_ExportBinding function as
RPCRT4_AddRefBinding and rename RPCRT4_DestroyBinding to
RPCRT4_ReleaseBinding to show that it's purpose is to release a
reference count and destroy if necessary, not always destroy.
2008-04-01 19:11:00 +02:00
Rob Shearman
c7f9b9347f
rpcrt4: Improve trace in RPCRT4_find_interface to print the interface identifier data as well as the object guid.
2008-04-01 19:10:48 +02:00
Andrew Talbot
1f53b85445
rpcrt4: Void functions should not return a value.
2008-03-31 12:13:59 +02:00
Rob Shearman
c06f26f2e3
rpcrt4: Print an error if an invalid client context handle is used.
2008-03-28 21:42:15 +01:00
Dan Hipschman
2fa83d94c8
widl: Make structures with FC_ENUM16 fields complex.
...
Structures containing enum fields without the v1_enum attribute must be
treated as complex because of the range check and memory/wire size
differences. This includes a test which didn't pass before and now
passes on Wine and Windows.
2008-03-21 11:24:28 +01:00
Dan Hipschman
629a29d81e
rpcrt4: Handle FC_ENUM16.
2008-03-21 11:24:19 +01:00
Dan Hipschman
764cf334d6
rpcrt4: Use correct count in rpcrt4_conn_np_write.
...
count is the total count passed into rpcrt4_conn_np_write. If WriteFile
does a partial write it would end up writing too much subsequent times
through the loop. All tests pass as before.
2008-03-20 14:27:34 +01:00
Rob Shearman
f15287dea7
rpcrt4: Add a stub for RpcCancelThreadEx.
2008-03-17 15:20:07 +01:00
Andrew Talbot
db6a901bf4
rpcrt4: Assign to structs instead of using memcpy.
2008-03-14 11:21:29 +01:00
Rob Shearman
0e7b25349d
rpcrt4: Fix the pointer level being passed into call_unmarshaller in client_do_args_old_format for base return parameters.
...
NdrBaseTypeUnmarshall expects a pointer to a pointer to a base type.
pRetVal contains a pointer to a base type, so we need to pass the
address of pRetVal into call_unmarshaller here.
2008-03-10 19:25:55 +01:00
Rob Shearman
259ccc573c
rpcrt4: Fix -Oi interpreter for base types.
...
Don't call memory sizing rountines to compute the size of a type, since
memory sizing routines have side effects like checking there is enough
space in the buffer for the type and incrementing the buffer pointer.
Instead, create a function which returns the necessary size of the
limited set of types we can encounter and remove call_memory_sizer which
is no longer needed.
2008-03-10 19:12:54 +01:00
Rob Shearman
a5599028ea
rpcrt4: Check that the input to RPCRT4_strndupW was not NULL before assuming that the string couldn't be allocated due to lack of memory.
2008-03-10 19:12:54 +01:00
Rob Shearman
a1e4bcda1a
rpcrt4: Use closesocket to close sockets and define it to close on Unix platforms to make the code more portable.
2008-03-06 17:39:31 +01:00
Rob Shearman
48000893f9
makefiles: Simplify the use of the IMPORTLIB variable in the DLL makefiles.
...
Only specify the root to keep platform-specifics out of the individual
DLL makefiles.
2008-03-04 20:55:01 +01:00
James Hawkins
00394486df
janitorial: Remove links to any microsoft site.
2008-03-01 12:03:59 +01:00
Rob Shearman
5dd2f1efa8
Include config.h and wine/port.h in files that use snprintf.
2008-02-29 12:39:28 +01:00