/* This file is a part of the NVDA project. URL: http://www.nvda-project.org/ Copyright 2006-2010 NVDA contributers. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2.0, as published by the Free Software Foundation. This program 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. This license can be found at: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #include #include #include #include #include #include "nvdaControllerInternal.h" #include #include "vbufRemote.h" #include "displayModelRemote.h" #include "NvdaInProcUtils.h" #include "nvdaControllerInternal.h" #include "rpcSrv.h" typedef RPC_STATUS(RPC_ENTRY *RpcServerRegisterIf3_functype)(RPC_IF_HANDLE,UUID __RPC_FAR*,RPC_MGR_EPV __RPC_FAR*,unsigned int,unsigned int,unsigned int,RPC_IF_CALLBACK_FN __RPC_FAR*,void __RPC_FAR*); RPC_IF_HANDLE availableInterfaces[]={ nvdaInProcUtils_NvdaInProcUtils_v1_0_s_ifspec, displayModelRemote_DisplayModel_v1_0_s_ifspec, VBufRemote_VBuf_v2_0_s_ifspec, }; //memory allocation functions void* __RPC_USER midl_user_allocate(size_t size) { return malloc(size); } void __RPC_USER midl_user_free(void* p) { free(p); } HANDLE nvdaUnregisteredEvent=NULL; RPC_BINDING_VECTOR* bindingVector; UUID nvdaInprocUuid; RPC_STATUS rpcSrv_initialize() { nvdaUnregisteredEvent=CreateEvent(NULL,TRUE,true,NULL); RPC_STATUS status; //Set the protocol status=RpcServerUseProtseq((RPC_WSTR)L"ncalrpc",RPC_C_PROTSEQ_MAX_REQS_DEFAULT,NULL); //We can ignore the error where the endpoint is already set if(status!=RPC_S_OK&&status!=RPC_S_DUPLICATE_ENDPOINT) { LOG_ERROR(L"Unable to use RPC endPoint. RPC error "<