[PATCH 4/4] advapi32/lsa: Added a stub for LsaLookupPrivilegeDisplayName()

Nikolay Sivov <[email protected]>
Newsgroups gmane.comp.emulators.wine.patches
Message-ID <[email protected]>
From: Michael Müller <[email protected]>

Signed-off-by: Nikolay Sivov <[email protected]>
---
 dlls/advapi32/advapi32.spec |  2 +-
 dlls/advapi32/lsa.c         | 18 ++++++++++++++++++
 include/ntlsa.h             |  2 ++
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 709a385967..359efc9ad1 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -468,7 +468,7 @@
 # @ stub LsaICLookupSidsWithCreds
 @ stdcall LsaLookupNames(long long ptr ptr ptr)
 @ stdcall LsaLookupNames2(ptr long long ptr ptr ptr)
-@ stub LsaLookupPrivilegeDisplayName
+@ stdcall LsaLookupPrivilegeDisplayName(long ptr ptr ptr)
 @ stdcall LsaLookupPrivilegeName(long ptr ptr)
 # @ stub LsaLookupPrivilegeValue
 @ stdcall LsaLookupSids(ptr long ptr ptr ptr)
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index 42da4b4afa..bfd879bbc7 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -44,6 +44,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
         return FailureCode; \
 }
 
+static LPCSTR debugstr_us( const UNICODE_STRING *us )
+{
+    if (!us) return "(null)";
+    return debugstr_wn(us->Buffer, us->Length / sizeof(WCHAR));
+}
+
 static void dumpLsaAttributes(const LSA_OBJECT_ATTRIBUTES *oa)
 {
     if (oa)
@@ -1006,3 +1012,15 @@ NTSTATUS WINAPI LsaLookupPrivilegeName(LSA_HANDLE handle, LUID *luid, LSA_UNICOD
 
     return STATUS_SUCCESS;
 }
+
+/******************************************************************************
+ * LsaLookupPrivilegeDisplayName [ADVAPI32.@]
+ *
+ */
+NTSTATUS WINAPI LsaLookupPrivilegeDisplayName(LSA_HANDLE handle, LSA_UNICODE_STRING *name,
+    LSA_UNICODE_STRING **display_name, SHORT *language)
+{
+    FIXME("(%p, %s, %p, %p)\n", handle, debugstr_us(name), display_name, language);
+
+    return STATUS_NO_SUCH_PRIVILEGE;
+}
diff --git a/include/ntlsa.h b/include/ntlsa.h
index 468c14e1b4..ca864f6356 100644
--- a/include/ntlsa.h
+++ b/include/ntlsa.h
@@ -16,4 +16,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+NTSTATUS WINAPI LsaLookupPrivilegeDisplayName(LSA_HANDLE policy, LSA_UNICODE_STRING *name,
+    LSA_UNICODE_STRING **display_name, SHORT *language);
 NTSTATUS WINAPI LsaLookupPrivilegeName(LSA_HANDLE policy, LUID *value, LSA_UNICODE_STRING **name);
-- 
2.14.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.