Commit eca464b6 authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard

Implemented RpcIsProtSeqValid.

parent 294c8af6
......@@ -2,6 +2,7 @@
* RPC binding API
*
* Copyright 2001 Ove Kven, TransGaming Technologies
* Copyright 2003 Mike Hearn
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -31,6 +32,7 @@
#include "winnls.h"
#include "winerror.h"
#include "winreg.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "rpc.h"
......@@ -1014,3 +1016,36 @@ RPC_STATUS WINAPI I_RpcBindingSetAsync( RPC_BINDING_HANDLE Binding, RPC_BLOCKING
return RPC_S_OK;
}
/***********************************************************************
* RpcNetworkIsProtSeqValidA (RPCRT4.@)
*/
RPC_STATUS RPC_ENTRY RpcNetworkIsProtSeqValidA(unsigned char *protseq) {
UNICODE_STRING protseqW;
if (!protseq) return RPC_S_INVALID_RPC_PROTSEQ; /* ? */
if (RtlCreateUnicodeStringFromAsciiz(&protseqW, protseq)) {
RPC_STATUS ret = RpcNetworkIsProtSeqValidW(protseqW.Buffer);
RtlFreeUnicodeString(&protseqW);
return ret;
} else return RPC_S_OUT_OF_MEMORY;
}
/***********************************************************************
* RpcNetworkIsProtSeqValidW (RPCRT4.@)
*
* Checks if the given protocol sequence is known by the RPC system.
* If it is, returns RPC_S_OK, otherwise RPC_S_PROTSEQ_NOT_SUPPORTED.
*
* We currently only support ncalrpc.
*/
RPC_STATUS RPC_ENTRY RpcNetworkIsProtSeqValidW(LPWSTR protseq) {
static const WCHAR ncalrpcW[] = {'n','c','a','l','r','p','c',0};
if (!protseq) return RPC_S_INVALID_RPC_PROTSEQ; /* ? */
if (!strcmpW(protseq, ncalrpcW)) return RPC_S_OK;
FIXME("Unknown protseq %s - we probably need to implement it one day", debugstr_w(protseq));
return RPC_S_PROTSEQ_NOT_SUPPORTED;
}
......@@ -238,6 +238,12 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
#define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcNetworkIsProtSeqValidA( unsigned char *protseq );
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcNetworkIsProtSeqValidW( LPWSTR protseq );
#define RpcNetworkIsProtSeqValid WINELIB_NAME_AW(RpcNetworkIsProtSeqValid)
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcStringFreeA(unsigned char** String);
RPCRTAPI RPC_STATUS RPC_ENTRY
RpcStringFreeW(unsigned short** String);
......
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