code: def readlink(link):
  	
  	handle = api.CreateFile(
  		link,
  		0,
  		0,
  		None,
  		api.OPEN_EXISTING,
  		api.FILE_FLAG_OPEN_REPARSE_POINT | api.FILE_FLAG_BACKUP_SEMANTICS,
  		None,
  	)
  
  	if handle == api.INVALID_HANDLE_VALUE:
  		raise WindowsError()
  
  	res = reparse.DeviceIoControl(
  		handle, api.FSCTL_GET_REPARSE_POINT, None, 10240)
  
  	bytes = create_string_buffer(res)
  	p_rdb = cast(bytes, POINTER(api.REPARSE_DATA_BUFFER))
  	rdb = p_rdb.contents
  	if not rdb.tag == api.IO_REPARSE_TAG_SYMLINK:
  		raise RuntimeError("Expected IO_REPARSE_TAG_SYMLINK, but got %d" % rdb.tag)
  
  	handle_nonzero_success(api.CloseHandle(handle))
  	return rdb.get_substitute_name()
docs: readlink(link) -> target
  	Return a string representing the path to which the symbolic link points.