reactos/reactos/lib/rpcrt4/clnt/string.c
David Welch 53e0232c6c Began seperation of machine-dependant/independant sections of memory
manager
Did some more work on the dce/rpc implementation
Corrected loadros so the kernel can no longer write to read-only areas
of memory
Corrected alignment and size of initial stack

svn path=/trunk/; revision=1108
2000-04-07 02:24:03 +00:00

53 lines
1.1 KiB
C

/*
*
*/
RPC_STATUS RpcStringBindingComposeA(PUCHAR Uuid,
PUCHAR Protocol,
PUCHAR Address,
PUCHAR Endpoint,
PUCHAR Options,
PUCHAR* Binding)
{
ULONG Len;
Len = strlen(Protocol) + 1 + strlen(Address) +
1 + strlen(Endpoint) + 1 + 1;
(*Binding) = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
Len);
strcpy(*Binding, Protocol);
strcat(*Binding, ":");
strcat(*Binding, Address);
strcat(*Binding, "[");
strcat(*Binding, Endpoint);
strcat(*Binding, "]");
return(STATUS_SUCCESS);
}
RPC_STATUS RpcStringBindingComposeW(PWCHAR Uuid,
PWCHAR Protocol,
PWCHAR Address,
PWCHAR Endpoint,
WCHAR Options,
PWCHAR* Binding)
{
ULONG Len;
Len = wcslen(Protocol) + 1 + wcslen(Address) +
1 + wcslen(Endpoint) + 1 + 1;
(*Binding) = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
Len * 2);
wcscpy(*Binding, Protocol);
wcscat(*Binding, ":");
wcscat(*Binding, Address);
wcscat(*Binding, "[");
wcscat(*Binding, Endpoint);
wcscat(*Binding, "]");
return(STATUS_SUCCESS);
}