Implement RpcBindingCopy()

svn path=/trunk/; revision=21374
This commit is contained in:
Saveliy Tretiakov 2006-03-24 14:14:34 +00:00
parent b7c89c9fe6
commit e60bf30f95
2 changed files with 37 additions and 1 deletions

View file

@ -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.@)

View file

@ -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)