advpack: Implement ExtractFilesW [try 2]

James Hawkins truiken at gmail.com
Thu Jun 11 17:04:31 CDT 2009


2009/6/11 Vladimir Pankratov <scriptkid at mail.ru>:
> Hello all.
>
> Implemented ExtractFilesW
>
> Changed files:
>  advpack/files.c
>

+    if (GetFileAttributesA(ExpandDir) == INVALID_FILE_ATTRIBUTES)
+        return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND);

Why are you testing this in ExtractFilesA?  Almost all of the logic
should be passed on to ExtractFilesW so we don't duplicate code.

+    if (FileList != NULL)

Please don't change the style of the file.  if (FileList) is fine.

+        WideCharToMultiByte( CP_ACP, 0, FileList, -1, szFileList,
sizeof(szFileList), NULL, NULL );
+        szConvertedList = convert_file_list(szFileList, &dwFileCount);

I'm not sure this is the way to go.  You're converting A -> W -> A.
This happens because cabinet.Extract is (as far as we know) ansi-only.
 In this case, I think it's ok to make ExtractFilesW call into
ExtractFilesA, with an appropriate comment as to why this is
happening.

-- 
James Hawkins



More information about the wine-devel mailing list