>From 5011a5aea822cbe45dbe479832c6b7c871908a9a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 31 Aug 2011 15:34:07 +1000
Subject: [PATCH] Add stubs DsServerRegisterSpnA, DsServerRegisterSpnW
To: wine-patches <wine-patches@winehq.org>

---
 dlls/ntdsapi/ntdsapi.c    |   20 ++++++++++++++++++++
 dlls/ntdsapi/ntdsapi.spec |    4 ++--
 include/ntdsapi.h         |   10 ++++++++++
 3 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdsapi/ntdsapi.c b/dlls/ntdsapi/ntdsapi.c
index 76565fb..1ffbd9d 100644
--- a/dlls/ntdsapi/ntdsapi.c
+++ b/dlls/ntdsapi/ntdsapi.c
@@ -165,3 +165,23 @@ DWORD WINAPI DsGetSpnA(DS_SPN_NAME_TYPE ServType, LPCSTR Servlass, LPCSTR ServNa
 
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
+
+/***********************************************************************
+ *             DsServerRegisterSpnA (NTDSAPI.@)
+ */
+DWORD WINAPI DsServerRegisterSpnA(DS_SPN_WRITE_OP operation, LPCSTR ServiceClass, LPCSTR UserObjectDN)
+{
+    FIXME("(%d,%s,%s): stub!\n", operation,
+            debugstr_a(ServiceClass), debugstr_a(UserObjectDN));
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/***********************************************************************
+ *             DsServerRegisterSpnW (NTDSAPI.@)
+ */
+DWORD WINAPI DsServerRegisterSpnW(DS_SPN_WRITE_OP operation, LPCWSTR ServiceClass, LPCWSTR UserObjectDN)
+{
+    FIXME("(%d,%s,%s): stub!\n", operation,
+            debugstr_w(ServiceClass), debugstr_w(UserObjectDN));
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
diff --git a/dlls/ntdsapi/ntdsapi.spec b/dlls/ntdsapi/ntdsapi.spec
index 8a4758a..f4ae6f8 100644
--- a/dlls/ntdsapi/ntdsapi.spec
+++ b/dlls/ntdsapi/ntdsapi.spec
@@ -80,8 +80,8 @@
 @ stub DsReplicaUpdateRefsW
 @ stub DsReplicaVerifyObjectsA
 @ stub DsReplicaVerifyObjectsW
-@ stub DsServerRegisterSpnA
-@ stub DsServerRegisterSpnW
+@ stdcall DsServerRegisterSpnA(long str str)
+@ stdcall DsServerRegisterSpnW(long wstr wstr)
 @ stub DsUnBindA
 @ stub DsUnBindW
 @ stub DsUnquoteRdnValueA
diff --git a/include/ntdsapi.h b/include/ntdsapi.h
index 9fecdab..3da79dd 100644
--- a/include/ntdsapi.h
+++ b/include/ntdsapi.h
@@ -39,6 +39,16 @@ typedef enum
     DS_SPN_SERVICE     = 5
 } DS_SPN_NAME_TYPE;
 
+typedef enum
+{
+    DS_SPN_ADD_SPN_OP     = 0,
+    DS_SPN_REPLACE_SPN_OP = 1,
+    DS_SPN_DELETE_SPN_OP  = 2
+} DS_SPN_WRITE_OP;
+
+DWORD WINAPI DsServerRegisterSpnA(DS_SPN_WRITE_OP operation, LPCSTR ServiceClass, LPCSTR UserObjectDN);
+DWORD WINAPI DsServerRegisterSpnW(DS_SPN_WRITE_OP operation, LPCWSTR ServiceClass, LPCWSTR UserObjectDN);
+
 #ifdef __cplusplus
 }
 #endif
-- 
1.7.4.1

