Implement RpcIsProtSeqValid
Mike Hearn
mike at theoretic.com
Tue Jan 20 13:53:15 CST 2004
Anything to avoid revision :D Should fix bug 1948
ChangeLog:
Implement RpcIsProtSeqValid, declare in header
Index: include/rpcdce.h
===================================================================
RCS file: /home/wine/wine/include/rpcdce.h,v
retrieving revision 1.21
diff -u -r1.21 rpcdce.h
--- include/rpcdce.h 21 Nov 2003 22:14:42 -0000 1.21
+++ include/rpcdce.h 20 Jan 2004 19:45:27 -0000
@@ -238,6 +238,12 @@
#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);
Index: dlls/rpcrt4/rpc_binding.c
===================================================================
RCS file: /home/wine/wine/dlls/rpcrt4/rpc_binding.c,v
retrieving revision 1.17
diff -u -r1.17 rpc_binding.c
--- dlls/rpcrt4/rpc_binding.c 9 Jan 2004 00:34:53 -0000 1.17
+++ dlls/rpcrt4/rpc_binding.c 20 Jan 2004 19:45:27 -0000
@@ -2,6 +2,7 @@
* RPC binding API
*
* Copyright 2001 Ove Kåven, TransGaming Technologies
+ * 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"
@@ -1013,4 +1015,37 @@
bind->BlockingFn = BlockingFn;
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;
}
More information about the wine-patches
mailing list