Commit 9bec4bb5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

rpcss: Implement interface to return sequential identifiers.

parent 52218251
/*
* 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);
}
...@@ -10,4 +10,5 @@ C_SRCS = \ ...@@ -10,4 +10,5 @@ C_SRCS = \
IDL_SRCS = \ IDL_SRCS = \
epm.idl \ epm.idl \
irot.idl irot.idl \
irpcss.idl
/*
* 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"
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "winsvc.h" #include "winsvc.h"
#include "irot.h" #include "irot.h"
#include "epm.h" #include "epm.h"
#include "irpcss.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -37,6 +38,13 @@ static WCHAR rpcssW[] = {'R','p','c','S','s',0}; ...@@ -37,6 +38,13 @@ static WCHAR rpcssW[] = {'R','p','c','S','s',0};
static HANDLE exit_event; static HANDLE exit_event;
static SERVICE_STATUS_HANDLE service_handle; 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 RPC_STATUS RPCSS_Initialize(void)
{ {
static unsigned short irot_protseq[] = IROT_PROTSEQ; static unsigned short irot_protseq[] = IROT_PROTSEQ;
...@@ -45,6 +53,8 @@ static RPC_STATUS RPCSS_Initialize(void) ...@@ -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_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_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 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 static const struct protseq_map
{ {
unsigned short *protseq; unsigned short *protseq;
...@@ -54,11 +64,13 @@ static RPC_STATUS RPCSS_Initialize(void) ...@@ -54,11 +64,13 @@ static RPC_STATUS RPCSS_Initialize(void)
{ epm_protseq, epm_endpoint }, { epm_protseq, epm_endpoint },
{ epm_protseq_lrpc, epm_endpoint_lrpc }, { epm_protseq_lrpc, epm_endpoint_lrpc },
{ irot_protseq, irot_endpoint }, { irot_protseq, irot_endpoint },
{ irpcss_protseq, irpcss_endpoint },
}; };
RPC_IF_HANDLE ifspecs[] = RPC_IF_HANDLE ifspecs[] =
{ {
epm_v3_0_s_ifspec, epm_v3_0_s_ifspec,
Irot_v0_2_s_ifspec, Irot_v0_2_s_ifspec,
Irpcss_v0_0_s_ifspec,
}; };
RPC_STATUS status; RPC_STATUS status;
int i, j; int i, j;
......
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