def create_sys_dsn(driver: str, **kw) -> bool:
    """
    (Windows only.)
    Create a system ODBC data source name (DSN).

    Args:
        driver: ODBC driver name
        kw: Driver attributes

    Returns:
        bool: was the DSN created?
    """
    attributes = []  # type: List[str]
    for attr in kw.keys():
        attributes.append("%s=%s" % (attr, kw[attr]))
    return bool(
        ctypes.windll.ODBCCP32.SQLConfigDataSource(0, ODBC_ADD_SYS_DSN,
                                                   driver,
                                                   nul.join(attributes))
    )