Commit Graph

139 Commits

Author SHA1 Message Date
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
Michael Stefaniuc 0449701c31 ole32: Remove superfluous pointer casts. 2009-02-11 12:29:56 +01:00
Nikolay Sivov 32cc4011ee kernel32: Make GetOverlappedResult crash on NULL args as native does. 2009-01-22 15:28:24 +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 ebdb933b6d ole32: Convert source files to utf-8. 2008-10-18 19:20:29 +02:00
Andrew Talbot 749184a1e8 ole32: Remove unneeded address-of operators from array names. 2008-07-11 14:06:31 +02:00
Austin English 1b24da3aa0 ole32: Spelling fixes. 2008-04-10 09:51:12 +02:00
Andrew Talbot e7b0f07c3e ole32: Assign to structs instead of using memcpy. 2008-03-11 12:11:51 +01:00
Rob Shearman ee2250bc44 ole32: Don't get the HRESULT from the buffer if we get an RPC_S_CALL_FAILED status back from the runtime.
The buffer might not contain any data and nowhere in our ole32 code 
passes HRESULTs in the buffer.
2008-01-22 12:00:49 +01:00
Rob Shearman fcccd9fca6 ole32: Partially implement ServerRpcChannelBuffer_GetDestCtx. 2008-01-15 14:36:29 +01:00
Rob Shearman b02b9496d2 ole32: Fix some uses of SEEK_SET when STREAM_SEEK_SET should have been used instead. 2008-01-09 12:25:59 +01:00
Rob Shearman f2b1a1106b ole32: Fix memory leaks caused by not calling the channel hook function when extension_size is zero.
Instead free the allocated memory outside of the channel hook function.
2008-01-07 22:54:53 +01:00
Rob Shearman b6553e7e29 ole32: Shortcut the RPC runtime for allocation of the message when processing the COM call by just sending a message to a window in the process. 2008-01-07 22:54:47 +01:00
Rob Shearman e3e704bc43 ole32: Clear the RPC_FLAGS_VALID_BIT flag from the RPC_MESSAGE ProcNum when shortcutting the RPC runtime. 2008-01-07 22:54:35 +01:00
Rob Shearman d84f0abb70 ole32: Determine the destination for the COM call and initialise the necessary parameters in ClientRpcChannelBuffer_GetBuffer instead of ClientRpcChannelBuffer_SendReceive.
The parameters are then freed in the matching 
ClientRpcChannelBuffer_FreeBuffer function.
2008-01-07 12:03:03 +01:00
Rob Shearman 93df1675f1 ole32: Fix RPC_GetLocalClassObject to wait for 30 seconds, even if messages arrive while we are waiting. 2007-12-20 12:10:35 +01:00
Rob Shearman 7ac980b1e7 ole32: Process messages while waiting for a local server to create a pipe. 2007-12-07 18:49:23 +01:00
Rob Shearman ddf59f50f7 ole32: Clean up properly in ClientRpcChannelBuffer_SendReceive in the case where PostMessageW fails. 2007-11-27 11:40:12 +01:00
Rob Shearman 6262230a4b ole32: Store the dispatch parameters in the message state structure to allow them to be initialised earlier in the sequence of IRpcChannelBuffer calls. 2007-11-27 11:40:07 +01:00
Rob Shearman 24723913e0 ole32: Use asynchronous I/O for the named pipe server for local servers. 2007-11-13 13:31:15 +01:00
Andrew Talbot 65bf44868c ole32: Void functions should not return a value. 2007-04-13 12:58:50 +02:00
Rob Shearman d6a435fc56 ole32: Pass the OXID info to RPC_CreateClientChannel and use this to pass the server process ID to channel hooks. 2007-03-28 12:10:40 +02:00
Rob Shearman d1ec56c871 ole32: Generate OXID_INFO in the stub manager.
Copy the OXID_INFO from the stub manager, if available, in 
proxy_manager_construct. Otherwise, attempt to resolve it.

Use ipidRemUnknown from OXID_INFO in the proxy manager instead of 
magically generating the IPID for RemUnknown.
2007-03-27 12:39:44 +02:00
Rob Shearman 15a0b7fad5 ole32: Don't keep the local server named pipe open for a single-use object. 2007-03-09 21:16:44 +01:00
Rob Shearman 880542a9f8 ole32: Close the named pipe after revoking local server objects. 2007-03-09 21:16:37 +01:00
Francois Gouget b0bde6b87c Assorted spelling fixes. 2007-01-18 12:56:52 +01:00
Rob Shearman ba25254d9f ole32: Remove some unneeded inclusions of headers.
Change some incorrect usages of SEEK_SET to the intended STREAM_SEEK_SET 
instead.
2007-01-10 12:08:51 +01:00
Rob Shearman beaaf0514f ole32: Fix a comment in rpc_sendreceive_thread that wasn't correct. 2007-01-10 12:02:26 +01:00
Francois Gouget 386bb905e7 ole32: Print GetLastError() in decimal with '%u'. 2007-01-06 11:40:43 +01:00
Rob Shearman 2db1d0de38 ole32: Make sure to reset the message state if it has been changed in RPC_ExecuteCall before returning.
Fix the hrFault parameter passed into the ClientNotify function in 
ClientRpcChannelBuffer_SendReceive so that it is correct in the case of 
messages dispatched with PostMessage.
Only unmarshal ORPCTHAT for non-fault packets.
2007-01-04 21:12:36 +01:00
Rob Shearman 7a5d5c5503 ole32: Fix the calculation of message_state->prefix_data_len in two places where it would come out negative. 2007-01-02 20:49:07 +01:00
Rob Shearman ee99b6d743 ole32: Marshal the ORPCTHAT structure prefixed to the server data.
Unmarshal the data on the client side (during
ClientChannelBuffer_SendReceive) and call ClientNotify.
2006-12-27 14:34:15 +01:00
Rob Shearman 844037ab01 ole32: Performing a COM call from within the processing of a sent message during a wait for completion of another COM call is not allowed.
Add a test for the behaviour where RPC_E_CANTCALLOUT_ININPUTSYNCCALL is returned.
2006-12-24 13:08:02 +01:00
Rob Shearman aca17cd120 ole32: Track the pending call count so that the correct call type can be passed to the message filter HandleInComingCall function. 2006-12-24 13:07:35 +01:00
Rob Shearman e236edb91e ole32: Send a causality ID in the ORPCTHIS header for a call.
Use the causality ID to determine whether this is a top-level or a 
nested (called-back) call for the purposes of IMessageFilter::HandleInComingCall.
2006-12-20 12:41:01 +01:00
Rob Shearman a089e57983 ole32: Pass in the IID and IUnknown* of the object being executed to the server notification and message filter functions. 2006-12-20 12:40:38 +01:00
Rob Shearman 9208eef55c ole32: Call the message filter for incoming calls. 2006-12-20 12:40:30 +01:00
Rob Shearman c0a25d3565 ole32: Call ServerNotify for channel hooks.
Store the SChannelHookCallInfo structure in the message state.
2006-12-20 12:40:03 +01:00
Rob Shearman 5788ee9f05 ole32: Implement CoRegisterChannelHook and call channel hook methods on the client side. 2006-12-20 12:39:50 +01:00
Rob Shearman 1dc5dec6e6 ole32: Marshal the ORPCTHIS structure prefixed to the client data when doing ORPC calls.
This is done by putting the ORPCTHIS data into the buffer when calling
IRpcChannelBuffer::GetBuffer on the client side and then storing the
amount we increased the buffer in a structure stored in the Handle
field. This is done to present the correct Buffer pointer to the proxy
so that it writes its data after the ORPCTHIS data.

Unmarshal the data on the server side (during RPC_ExecuteCall) and make 
sure the data is consistent according to NDR rules. Also add several 
checks on the unmarshaled data that are specified by the DCOM draft 
specification.
2006-12-20 12:36:43 +01:00
Rob Shearman fff2d8e82b ole32: Re-enable the code that unregisters interfaces with the RPC runtime. 2006-11-13 14:32:45 +01:00
Rob Shearman b1bfad067b ole32: Fix a memory leak on the error path of dispatch_rpc. 2006-10-27 11:59:58 +02:00
Michael Stefaniuc 21ff87bf50 ole32: Win64 printf format warning fixes. 2006-10-16 10:53:28 +02:00
Huw Davies fead72e8a7 ole32: Don't return from CoRegisterClassObject until we have created the named pipe.
Also don't fail if the client connects to the pipe between CreateNamedPipe and ConnectNamedPipe.
2006-09-28 11:56:08 +02:00
Robert Shearman 6bf6caa69d ole32: Add a reference to the stream in RPC_StartLocalServer since we
release a reference to it when the local server thread dies.
2006-09-07 11:43:49 +02:00
Robert Shearman 679dfb029d ole32: Return errors if the attempt to start a LocalService object fails. 2006-08-28 17:48:47 +02:00
Robert Shearman 83d24a6408 ole32: Move the opening of the AppId key for a clsid to a helper function. 2006-08-26 19:28:10 +02:00
Robert Shearman 352d9e2d67 ole32: Free the buffer allocated in local_server_thread (found by Smatch). 2006-07-17 13:43:44 +02:00
Robert Shearman aa09031c78 ole32: Reuse event handles used for COM calls.
This reduces the number of server calls during a COM call by half.
2006-06-19 10:28:20 +02:00
Robert Shearman c60c28cf08 ole32: If IRpcStubBuffer_Invoke fails, we should raise an exception to
tell the RPC runtime that the call failed.
2006-06-09 21:11:20 +02:00