Do not use an output parameter to return the value. Instead, return the actual ip:port string on success or NULL on error.