X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwimboot.c;h=467f9fb389c5dcd967cfb65e14bacae9e724d7e4;hp=d4643d67e516ff2a9392a978ae0aa855105d674d;hb=0ae7e5538476723feb14f07a478b92210e24a21b;hpb=211f0c729ab69879e28398d1d71d0a6bc01ed2c8 diff --git a/src/wimboot.c b/src/wimboot.c index d4643d67..467f9fb3 100644 --- a/src/wimboot.c +++ b/src/wimboot.c @@ -866,47 +866,6 @@ out: return ret; } -/* Try to attach an instance of the Windows Overlay File System Filter Driver to - * the specified drive (such as C:) */ -static bool -try_to_attach_wof(const wchar_t *drive) -{ - HMODULE fltlib; - bool retval = false; - - /* Use FilterAttach() from Fltlib.dll. */ - - fltlib = LoadLibrary(L"Fltlib.dll"); - - if (!fltlib) { - WARNING("Failed to load Fltlib.dll"); - return retval; - } - - HRESULT (WINAPI *func_FilterAttach)(LPCWSTR lpFilterName, - LPCWSTR lpVolumeName, - LPCWSTR lpInstanceName, - DWORD dwCreatedInstanceNameLength, - LPWSTR lpCreatedInstanceName); - - func_FilterAttach = (void *)GetProcAddress(fltlib, "FilterAttach"); - - if (func_FilterAttach) { - HRESULT res; - - res = (*func_FilterAttach)(L"WoF", drive, NULL, 0, NULL); - - if (res == S_OK) - retval = true; - } else { - WARNING("FilterAttach() does not exist in Fltlib.dll"); - } - - FreeLibrary(fltlib); - - return retval; -} - /* * Allocate a WOF data source ID for a WIM file. * @@ -1001,7 +960,7 @@ retry_ioctl: CloseHandle(h); h = INVALID_HANDLE_VALUE; tried_to_attach_wof = true; - if (try_to_attach_wof(drive_path + 4)) + if (win32_try_to_attach_wof(drive_path + 4)) goto retry_ioctl; } ret = WIMLIB_ERR_UNSUPPORTED;