mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Implement RpcBindingCopy()
svn path=/trunk/; revision=21374
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user