Unfortunately, SetCurrentDirectory affects the entire processes, causing other threads to fail if they expect the current directory to remain unchanged. i.e. it's not OK for a library to call this function since it's not reasonable to assume no other threads are running.
MFXEnumImplementations calls SetCurrentDirectory through LoaderCtxVPL::SearchDirForLibs: https://github.com/oneapi-src/oneVPL/blob/e12ace9761bb52786409e830f619916b86e87fc5/dispatcher/vpl/mfx_dispatcher_vpl_loader.cpp#L174
Unfortunately, SetCurrentDirectory affects the entire processes, causing other threads to fail if they expect the current directory to remain unchanged. i.e. it's not OK for a library to call this function since it's not reasonable to assume no other threads are running.