Obtains all the connected eDNA services.

    :return: A pandas DataFrame of connected eDNA services in the form [Name,
        Description, Type, Status]

def GetServices():
    """
    Obtains all the connected eDNA services.

    :return: A pandas DataFrame of connected eDNA services in the form [Name,
        Description, Type, Status]
    """
    # Define all required variables in the correct ctypes format
    pulKey = c_ulong(0)
    szType = c_char_p("".encode('utf-8'))
    szStartSvcName = c_char_p("".encode('utf-8'))
    szSvcName, szSvcDesc = create_string_buffer(30), create_string_buffer(90)
    szSvcType, szSvcStat = create_string_buffer(30), create_string_buffer(30)
    szSvcName2, szSvcDesc2 = create_string_buffer(30), create_string_buffer(90)
    szSvcType2, szSvcStat2 = create_string_buffer(30), create_string_buffer(30)
    nSvcName, nSvcDesc = c_ushort(30), c_ushort(90)
    nSvcType, nSvcStat = c_ushort(30), c_ushort(30)

    # Call the eDNA function. nRet is zero if the function is successful.
    services = []
    nRet = dna_dll.DnaGetServiceEntry(szType, szStartSvcName, byref(pulKey),
        byref(szSvcName), nSvcName, byref(szSvcDesc), nSvcDesc,
        byref(szSvcType), nSvcType, byref(szSvcStat), nSvcStat)
    serv = _FormatServices(szSvcName, szSvcDesc, szSvcType, szSvcStat)
    if serv:
        services.append(serv)

    # Iterate across all the returned services
    while nRet == 0:
        nRet = dna_dll.DnaGetNextServiceEntry(pulKey,
            byref(szSvcName2), nSvcName, byref(szSvcDesc2), nSvcDesc,
            byref(szSvcType2), nSvcType, byref(szSvcStat2), nSvcStat)
        # We want to ensure only UTF-8 characters are returned. Ignoring
        # characters is slightly unsafe, but they should only occur in the
        # units or description, so it's not a huge issue.
        serv = _FormatServices(szSvcName2, szSvcDesc2, szSvcType2, szSvcStat2)
        if serv:
            services.append(serv)

    # If no results were returned, raise a warning
    df = pd.DataFrame()
    if services:
        df = pd.DataFrame(services, columns=["Name", "Description", "Type",
                                             "Status"])
    else:
        warnings.warn("WARNING- No connected eDNA services detected. Check " +
                      "your DNASys.ini file and your network connection.")
    return df