ADVAPI32: implement GetFileSecurity A->W

Mike McCormack mike at codeweavers.com
Sun Aug 15 10:39:57 CDT 2004


ChangeLog:
* implement GetFileSecurity A->W
-------------- next part --------------
Index: dlls/advapi32/security.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/security.c,v
retrieving revision 1.75
diff -u -r1.75 security.c
--- dlls/advapi32/security.c	13 Aug 2004 23:55:43 -0000	1.75
+++ dlls/advapi32/security.c	15 Aug 2004 14:15:36 -0000
@@ -973,8 +973,23 @@
                     PSECURITY_DESCRIPTOR pSecurityDescriptor,
                     DWORD nLength, LPDWORD lpnLengthNeeded )
 {
-  FIXME("(%s) : stub\n", debugstr_a(lpFileName));
-  return TRUE;
+    DWORD len;
+    BOOL r;
+    LPWSTR name = NULL;
+
+    if( lpFileName )
+    {
+        len = MultiByteToWideChar( CP_ACP, 0, lpFileName, -1, NULL, 0 );
+        name = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
+        MultiByteToWideChar( CP_ACP, 0, lpFileName, -1, name, len );
+    }
+
+    r = GetFileSecurityW( name, RequestedInformation, pSecurityDescriptor,
+                          nLength, lpnLengthNeeded );
+    if( name )
+        HeapFree( GetProcessHeap(), 0, name );
+
+    return r;
 }
 
 /******************************************************************************


More information about the wine-patches mailing list