Commit cfc50f89 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Add cross-process running-object table support.

parent 41bf0d48
......@@ -409,6 +409,8 @@ dlls/ole32/dcom.h
dlls/ole32/drag_copy.cur
dlls/ole32/drag_link.cur
dlls/ole32/drag_move.cur
dlls/ole32/irot.h
dlls/ole32/irot_c.c
dlls/ole32/libole32.def
dlls/ole32/nodrop.cur
dlls/ole32/ole32res.res
......@@ -815,6 +817,8 @@ programs/regedit/rsrc.res
programs/regedit/string.ico
programs/regsvr32/regsvr32
programs/regsvr32/regsvr32.res
programs/rpcss/irot.h
programs/rpcss/irot_s.c
programs/rpcss/rpcss
programs/rundll32/rundll32
programs/spoolsv/spoolsv
......
......@@ -71,6 +71,9 @@ RC_BINARIES = \
IDL_H_SRCS = \
dcom.idl
IDL_C_SRCS = \
irot.idl
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
/*
* Copyright 2007 Robert Shearman for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/irot.idl"
/*
* Copyright 2007 Robert Shearman for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
import "wtypes.idl";
cpp_quote("#define IROT_PROTSEQ {'n','c','a','l','r','p','c',0}");
cpp_quote("#define IROT_ENDPOINT {'i','r','o','t',0}");
typedef struct tagMonikerComparisonData {
ULONG ulCntData;
[size_is(ulCntData)] BYTE abData[];
} MonikerComparisonData;
[
uuid(7a98c254-6808-11cf-b73b-00aa00b677a8),
version(0.2)
]
interface Irot
{
typedef struct tagInterfaceData
{
ULONG ulCntData;
[size_is(ulCntData)] BYTE abData[];
} InterfaceData;
typedef [unique] InterfaceData *PInterfaceData;
typedef struct tagInterfaceList
{
ULONG size;
[size_is(size)] PInterfaceData interfaces[];
} InterfaceList;
typedef [unique] InterfaceList *PInterfaceList;
typedef DWORD IrotCookie;
typedef handle_t IrotHandle;
HRESULT IrotRegister(
[in] IrotHandle h,
[in] const MonikerComparisonData *moniker_data,
[in] const InterfaceData *object,
[in] const InterfaceData *moniker,
[in] const FILETIME *time,
[in] DWORD grfFlags,
[out] IrotCookie *cookie);
HRESULT IrotRevoke(
[in] IrotHandle h,
[in] IrotCookie cookie,
[out] PInterfaceData *object,
[out] PInterfaceData *moniker);
HRESULT IrotIsRunning(
[in] IrotHandle h,
[in] const MonikerComparisonData *moniker_data);
HRESULT IrotGetObject(
[in] IrotHandle h,
[in] const MonikerComparisonData *moniker_data,
[out] PInterfaceData *obj,
[out] IrotCookie *cookie);
HRESULT IrotNoteChangeTime(
[in] IrotHandle h,
[in] IrotCookie cookie,
[in] const FILETIME *time);
HRESULT IrotGetTimeOfLastChange(
[in] IrotHandle h,
[in] const MonikerComparisonData *moniker_data,
[out] FILETIME *time);
HRESULT IrotEnumRunning(
[in] IrotHandle h,
[out] PInterfaceList *list);
}
......@@ -4,13 +4,17 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = rpcss.exe
APPMODE = -mconsole
IMPORTS = kernel32 ntdll
IMPORTS = rpcrt4 kernel32 ntdll
C_SRCS = \
epmap_server.c \
irotp.c \
np_server.c \
rpcss_main.c
IDL_S_SRCS = \
irot.idl
@MAKE_PROG_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
/*
* Copyright 2007 Robert Shearman for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/irot.idl"
......@@ -61,6 +61,7 @@
#define NONAMELESSSTRUCT
#include "rpcss.h"
#include "winnt.h"
#include "irot.h"
#include "wine/debug.h"
......@@ -83,6 +84,10 @@ static BOOL RPCSS_work(HANDLE exit_event)
static BOOL RPCSS_Initialize(void)
{
static unsigned short irot_protseq[] = IROT_PROTSEQ;
static unsigned short irot_endpoint[] = IROT_ENDPOINT;
RPC_STATUS status;
WINE_TRACE("\n");
exit_event = __wine_make_process_system();
......@@ -102,7 +107,16 @@ static BOOL RPCSS_Initialize(void)
return FALSE;
}
return TRUE;
status = RpcServerUseProtseqEpW(irot_protseq, RPC_C_PROTSEQ_MAX_REQS_DEFAULT,
irot_endpoint, NULL);
if (status == RPC_S_OK)
status = RpcServerRegisterIf(Irot_v0_2_s_ifspec, NULL, NULL);
if (status == RPC_S_OK)
status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE);
else
RpcServerUnregisterIf(Irot_v0_2_s_ifspec, NULL, FALSE);
return status == RPC_S_OK;
}
/* returns false if we discover at the last moment that we
......@@ -117,6 +131,9 @@ static BOOL RPCSS_Shutdown(void)
master_mutex = NULL;
RpcMgmtStopServerListening(NULL);
RpcServerUnregisterIf(Irot_v0_2_s_ifspec, NULL, TRUE);
CloseHandle(exit_event);
return TRUE;
......
......@@ -104,6 +104,7 @@ my @ignore_srcs = (
my %private_headers = (
"thread.h" => 1,
"win.h" => 1,
"wine/irot.idl" => 1,
"wine/list.h" => 1,
"wine/mmsystem16.h" => 1,
"wine/mscvpdb.h" => 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment