Add ffi code to support raising windows