Certain UWP programs can't obtain a normal window handle from their API for whatever reason (this was observed with minecraft win10 edition), so if the normal window handle on the map fails, try window handle 0 instead.