public static IntPtr?GetMainSpotifyWindow(Process process) { var window = NativeUtils.GetAllWindowsOfProcess(process).Find(window => IsMainSpotifyWindow(window)); return(window == default ? null : window); }