mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Implement RpcBindingCopy()
svn path=/trunk/; revision=21374
This commit is contained in:
parent
b7c89c9fe6
commit
e60bf30f95
2 changed files with 37 additions and 1 deletions
|
@ -592,6 +592,42 @@ static LPWSTR RPCRT4_strconcatW(LPWSTR dst, LPCWSTR src)
|
|||
return ndst;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RpcBindingCopy (RPCRT4.@)
|
||||
*/
|
||||
RPC_STATUS RPC_ENTRY RpcBindingCopy(
|
||||
RPC_BINDING_HANDLE SourceBinding,
|
||||
RPC_BINDING_HANDLE* DestinationBinding)
|
||||
{
|
||||
TRACE("RpcBindingCopy called\n");
|
||||
RpcBinding *DestBinding = 0, *SrcBinding = (RpcBinding*)SourceBinding;
|
||||
|
||||
if(SrcBinding->server)
|
||||
{
|
||||
*DestinationBinding = NULL;
|
||||
return RPC_S_WRONG_KIND_OF_BINDING;
|
||||
}
|
||||
|
||||
DestBinding = (RpcBinding*)
|
||||
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcBinding));
|
||||
|
||||
if(!DestBinding)
|
||||
{
|
||||
*DestinationBinding = NULL;
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
memcpy(DestBinding, SrcBinding, sizeof(RpcBinding));
|
||||
DestBinding->refs = 1;
|
||||
DestBinding->Next = NULL;
|
||||
DestBinding->server = FALSE;
|
||||
DestBinding->Protseq = RPCRT4_strndupA(SrcBinding->Protseq, -1);
|
||||
DestBinding->NetworkAddr = RPCRT4_strndupA(SrcBinding->NetworkAddr, -1);
|
||||
DestBinding->Endpoint = RPCRT4_strndupA(SrcBinding->Endpoint, -1);
|
||||
|
||||
*DestinationBinding = DestBinding;
|
||||
return RPC_S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* RpcStringBindingComposeA (RPCRT4.@)
|
||||
|
|
|
@ -369,7 +369,7 @@
|
|||
@ stub RpcAsyncGetCallStatus
|
||||
@ stub RpcAsyncInitializeHandle
|
||||
@ stub RpcAsyncRegisterInfo
|
||||
@ stub RpcBindingCopy
|
||||
@ stdcall RpcBindingCopy(ptr ptr)
|
||||
@ stdcall RpcBindingFree(ptr)
|
||||
@ stdcall RpcBindingFromStringBindingA(str ptr)
|
||||
@ stdcall RpcBindingFromStringBindingW(wstr ptr)
|
||||
|
|
Loading…
Reference in a new issue