ADVAPI32: implement SetFileSecurity A->W
Mike McCormack
mike at codeweavers.com
Sun Aug 15 11:14:05 CDT 2004
ChangeLog:
* implement SetFileSecurity 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:48:07 -0000
@@ -1076,8 +1091,22 @@
SECURITY_INFORMATION RequestedInformation,
PSECURITY_DESCRIPTOR pSecurityDescriptor)
{
- 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 = SetFileSecurityW( name, RequestedInformation, pSecurityDescriptor );
+ if( name )
+ HeapFree( GetProcessHeap(), 0, name );
+
+ return r;
}
/******************************************************************************
More information about the wine-patches
mailing list