diff --git a/include/wine/irpcss.idl b/include/wine/irpcss.idl new file mode 100644 index 00000000000..1874e100254 --- /dev/null +++ b/include/wine/irpcss.idl @@ -0,0 +1,33 @@ +/* + * Copyright 2019 Nikolay Sivov 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 IRPCSS_PROTSEQ {'n','c','a','l','r','p','c',0}") +cpp_quote("#define IRPCSS_ENDPOINT {'i','r','p','c','s','s',0}") + +[ + uuid(85da4974-edc7-40ff-bad4-9c4525a8d044), + version(0.0), +] +interface Irpcss +{ + HRESULT irpcss_get_thread_seq_id( + [in] handle_t handle, + [out] DWORD *sequence_id); +} diff --git a/programs/rpcss/Makefile.in b/programs/rpcss/Makefile.in index 6ccb5e965aa..dcc405a944b 100644 --- a/programs/rpcss/Makefile.in +++ b/programs/rpcss/Makefile.in @@ -10,4 +10,5 @@ C_SRCS = \ IDL_SRCS = \ epm.idl \ - irot.idl + irot.idl \ + irpcss.idl diff --git a/programs/rpcss/irpcss.idl b/programs/rpcss/irpcss.idl new file mode 100644 index 00000000000..1f346ada828 --- /dev/null +++ b/programs/rpcss/irpcss.idl @@ -0,0 +1,21 @@ +/* + * Copyright 2019 Nikolay Sivov 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 + */ + +#pragma makedep server + +#include "wine/irpcss.idl" diff --git a/programs/rpcss/rpcss_main.c b/programs/rpcss/rpcss_main.c index 42749028c3f..6e85ef2c337 100644 --- a/programs/rpcss/rpcss_main.c +++ b/programs/rpcss/rpcss_main.c @@ -28,6 +28,7 @@ #include "winsvc.h" #include "irot.h" #include "epm.h" +#include "irpcss.h" #include "wine/debug.h" @@ -37,6 +38,13 @@ static WCHAR rpcssW[] = {'R','p','c','S','s',0}; static HANDLE exit_event; static SERVICE_STATUS_HANDLE service_handle; +HRESULT __cdecl irpcss_get_thread_seq_id(handle_t h, DWORD *id) +{ + static LONG thread_seq_id; + *id = InterlockedIncrement(&thread_seq_id); + return S_OK; +} + static RPC_STATUS RPCSS_Initialize(void) { static unsigned short irot_protseq[] = IROT_PROTSEQ; @@ -45,6 +53,8 @@ static RPC_STATUS RPCSS_Initialize(void) static unsigned short epm_endpoint[] = {'\\','p','i','p','e','\\','e','p','m','a','p','p','e','r',0}; static unsigned short epm_protseq_lrpc[] = {'n','c','a','l','r','p','c',0}; static unsigned short epm_endpoint_lrpc[] = {'e','p','m','a','p','p','e','r',0}; + static unsigned short irpcss_protseq[] = IRPCSS_PROTSEQ; + static unsigned short irpcss_endpoint[] = IRPCSS_ENDPOINT; static const struct protseq_map { unsigned short *protseq; @@ -54,11 +64,13 @@ static RPC_STATUS RPCSS_Initialize(void) { epm_protseq, epm_endpoint }, { epm_protseq_lrpc, epm_endpoint_lrpc }, { irot_protseq, irot_endpoint }, + { irpcss_protseq, irpcss_endpoint }, }; RPC_IF_HANDLE ifspecs[] = { epm_v3_0_s_ifspec, Irot_v0_2_s_ifspec, + Irpcss_v0_0_s_ifspec, }; RPC_STATUS status; int i, j;