code: def _get_file_name_for_handle(handle):
      
  
      assert is_win
      assert handle != winapi.INVALID_HANDLE_VALUE
  
      size = winapi.FILE_NAME_INFO.FileName.offset + \
          winapi.MAX_PATH * ctypes.sizeof(winapi.WCHAR)
      buf = ctypes.create_string_buffer(size)
  
      if winapi.GetFileInformationByHandleEx is None:
          # Windows XP
          return None
  
      status = winapi.GetFileInformationByHandleEx(
          handle, winapi.FileNameInfo, buf, size)
      if status == 0:
          return None
  
      name_info = ctypes.cast(
          buf, ctypes.POINTER(winapi.FILE_NAME_INFO)).contents
      offset = winapi.FILE_NAME_INFO.FileName.offset
      data = buf[offset:offset + name_info.FileNameLength]
      return bytes2fsn(data, "utf-16-le")
docs: (Windows only) Returns a file name for a file handle.
  
      Args:
          handle (winapi.HANDLE)
      Returns:
         `text` or `None` if no file name could be retrieved.