+ if(CabName) {
+ cab_name = heap_strdupWtoA(CabName);
+ if(!cab_name)
+ return E_OUTOFMEMORY;
+ }
+
+ if(ExpandDir) {
+ expand_dir = heap_strdupWtoA(ExpandDir);
+ if(!expand_dir)
+ hres = E_OUTOFMEMORY;
+ }
+
+ if(SUCCEEDED(hres) && FileList) {
+ file_list = heap_strdupWtoA(FileList);
+ if(!file_list)
+ hres = E_OUTOFMEMORY;
+ }
+
+ /* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
+ so we need W->A conversion at some point anyway. */
+ if(SUCCEEDED(hres))
+ hres = ExtractFilesA(cab_name, expand_dir, Flags, file_list, LReserved, Reserved);
+
+ heap_free(cab_name);
+ heap_free(expand_dir);
+ heap_free(file_list);
+ return hres;