Commit 4794dc0e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

rpcrt4: Add RPC_CSTR, RPC_WSTR and update the prototypes accordingly.

parent 8e38ac59
......@@ -68,7 +68,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
* RpcEpRegisterA (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *BindingVector,
UUID_VECTOR *UuidVector, unsigned char *Annotation )
UUID_VECTOR *UuidVector, RPC_CSTR Annotation )
{
RPCSS_NP_MESSAGE msg;
RPCSS_NP_REPLY reply;
......
......@@ -590,7 +590,7 @@ RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector )
/***********************************************************************
* RpcServerUseProtseqEpA (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerUseProtseqEpA( unsigned char *Protseq, UINT MaxCalls, unsigned char *Endpoint, LPVOID SecurityDescriptor )
RPC_STATUS WINAPI RpcServerUseProtseqEpA( RPC_CSTR Protseq, UINT MaxCalls, RPC_CSTR Endpoint, LPVOID SecurityDescriptor )
{
RPC_POLICY policy;
......@@ -607,7 +607,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpA( unsigned char *Protseq, UINT MaxCalls,
/***********************************************************************
* RpcServerUseProtseqEpW (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerUseProtseqEpW( LPWSTR Protseq, UINT MaxCalls, LPWSTR Endpoint, LPVOID SecurityDescriptor )
RPC_STATUS WINAPI RpcServerUseProtseqEpW( RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor )
{
RPC_POLICY policy;
......@@ -639,7 +639,7 @@ static RpcServerProtseq *alloc_serverprotoseq(UINT MaxCalls, char *Protseq, char
/***********************************************************************
* RpcServerUseProtseqEpExA (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerUseProtseqEpExA( unsigned char *Protseq, UINT MaxCalls, unsigned char *Endpoint, LPVOID SecurityDescriptor,
RPC_STATUS WINAPI RpcServerUseProtseqEpExA( RPC_CSTR Protseq, UINT MaxCalls, RPC_CSTR Endpoint, LPVOID SecurityDescriptor,
PRPC_POLICY lpPolicy )
{
char *szps = (char*)Protseq, *szep = (char*)Endpoint;
......@@ -657,7 +657,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExA( unsigned char *Protseq, UINT MaxCall
/***********************************************************************
* RpcServerUseProtseqEpExW (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerUseProtseqEpExW( LPWSTR Protseq, UINT MaxCalls, LPWSTR Endpoint, LPVOID SecurityDescriptor,
RPC_STATUS WINAPI RpcServerUseProtseqEpExW( RPC_WSTR Protseq, UINT MaxCalls, RPC_WSTR Endpoint, LPVOID SecurityDescriptor,
PRPC_POLICY lpPolicy )
{
RpcServerProtseq* ps;
......@@ -675,7 +675,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqEpExW( LPWSTR Protseq, UINT MaxCalls, LPWST
/***********************************************************************
* RpcServerUseProtseqA (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerUseProtseqA(unsigned char *Protseq, unsigned int MaxCalls, void *SecurityDescriptor)
RPC_STATUS WINAPI RpcServerUseProtseqA(RPC_CSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor)
{
TRACE("(Protseq == %s, MaxCalls == %d, SecurityDescriptor == ^%p)\n", debugstr_a((char*)Protseq), MaxCalls, SecurityDescriptor);
return RpcServerUseProtseqEpA(Protseq, MaxCalls, NULL, SecurityDescriptor);
......@@ -684,7 +684,7 @@ RPC_STATUS WINAPI RpcServerUseProtseqA(unsigned char *Protseq, unsigned int MaxC
/***********************************************************************
* RpcServerUseProtseqW (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerUseProtseqW(LPWSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor)
RPC_STATUS WINAPI RpcServerUseProtseqW(RPC_WSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor)
{
TRACE("Protseq == %s, MaxCalls == %d, SecurityDescriptor == ^%p)\n", debugstr_w(Protseq), MaxCalls, SecurityDescriptor);
return RpcServerUseProtseqEpW(Protseq, MaxCalls, NULL, SecurityDescriptor);
......@@ -858,7 +858,7 @@ RPC_STATUS WINAPI RpcObjectSetType( UUID* ObjUuid, UUID* TypeUuid )
/***********************************************************************
* RpcServerRegisterAuthInfoA (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerRegisterAuthInfoA( unsigned char *ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
RPC_STATUS WINAPI RpcServerRegisterAuthInfoA( RPC_CSTR ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
LPVOID Arg )
{
FIXME( "(%s,%lu,%p,%p): stub\n", ServerPrincName, AuthnSvc, GetKeyFn, Arg );
......@@ -869,7 +869,7 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoA( unsigned char *ServerPrincName, un
/***********************************************************************
* RpcServerRegisterAuthInfoW (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( LPWSTR ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, unsigned long AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
LPVOID Arg )
{
FIXME( "(%s,%lu,%p,%p): stub\n", debugstr_w( ServerPrincName ), AuthnSvc, GetKeyFn, Arg );
......
......@@ -963,7 +963,7 @@ RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data,
* If it is, returns RPC_S_OK, otherwise RPC_S_PROTSEQ_NOT_SUPPORTED.
*
*/
RPC_STATUS WINAPI RpcNetworkIsProtseqValidW(LPWSTR protseq)
RPC_STATUS WINAPI RpcNetworkIsProtseqValidW(RPC_WSTR protseq)
{
char ps[0x10];
......@@ -980,7 +980,7 @@ RPC_STATUS WINAPI RpcNetworkIsProtseqValidW(LPWSTR protseq)
/***********************************************************************
* RpcNetworkIsProtseqValidA (RPCRT4.@)
*/
RPC_STATUS WINAPI RpcNetworkIsProtseqValidA(unsigned char *protseq)
RPC_STATUS WINAPI RpcNetworkIsProtseqValidA(RPC_CSTR protseq)
{
UNICODE_STRING protseqW;
......
......@@ -174,7 +174,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
*
* S_OK if successful.
*/
RPC_STATUS WINAPI RpcStringFreeA(unsigned char** String)
RPC_STATUS WINAPI RpcStringFreeA(RPC_CSTR* String)
{
HeapFree( GetProcessHeap(), 0, *String);
......@@ -190,7 +190,7 @@ RPC_STATUS WINAPI RpcStringFreeA(unsigned char** String)
*
* S_OK if successful.
*/
RPC_STATUS WINAPI RpcStringFreeW(unsigned short** String)
RPC_STATUS WINAPI RpcStringFreeW(RPC_WSTR* String)
{
HeapFree( GetProcessHeap(), 0, *String);
......@@ -509,7 +509,7 @@ unsigned short WINAPI UuidHash(UUID *uuid, RPC_STATUS *Status)
* S_OK if successful.
* S_OUT_OF_MEMORY if unsuccessful.
*/
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid)
RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, RPC_CSTR* StringUuid)
{
*StringUuid = HeapAlloc( GetProcessHeap(), 0, sizeof(char) * 37);
......@@ -535,7 +535,7 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid)
* S_OK if successful.
* S_OUT_OF_MEMORY if unsuccessful.
*/
RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, unsigned short** StringUuid)
RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, RPC_WSTR* StringUuid)
{
char buf[37];
......@@ -569,7 +569,7 @@ static const BYTE hex2bin[] =
/***********************************************************************
* UuidFromStringA (RPCRT4.@)
*/
RPC_STATUS WINAPI UuidFromStringA(unsigned char* s, UUID *uuid)
RPC_STATUS WINAPI UuidFromStringA(RPC_CSTR s, UUID *uuid)
{
int i;
......@@ -609,7 +609,7 @@ RPC_STATUS WINAPI UuidFromStringA(unsigned char* s, UUID *uuid)
/***********************************************************************
* UuidFromStringW (RPCRT4.@)
*/
RPC_STATUS WINAPI UuidFromStringW(unsigned short* s, UUID *uuid)
RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid)
{
int i;
......@@ -762,7 +762,7 @@ BOOL RPCRT4_RPCSSOnDemandCall(PRPCSS_NP_MESSAGE msg, char *vardata_payload, PRPC
* 4. The MSDN documentation currently declares that the second argument is
* unsigned char *, even for the W version. I don't believe it.
*/
RPC_STATUS RPC_ENTRY DceErrorInqTextW (RPC_STATUS e, unsigned short *buffer)
RPC_STATUS RPC_ENTRY DceErrorInqTextW (RPC_STATUS e, RPC_WSTR buffer)
{
DWORD count;
count = FormatMessageW (FORMAT_MESSAGE_FROM_SYSTEM |
......@@ -785,7 +785,7 @@ RPC_STATUS RPC_ENTRY DceErrorInqTextW (RPC_STATUS e, unsigned short *buffer)
/******************************************************************************
* DceErrorInqTextA (rpcrt4.@)
*/
RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, unsigned char *buffer)
RPC_STATUS RPC_ENTRY DceErrorInqTextA (RPC_STATUS e, RPC_CSTR buffer)
{
RPC_STATUS status;
WCHAR bufferW [MAX_RPC_ERROR_TEXT];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment