Use the ICIClientSettings interface GetHomeIPString method to retrieve the IP address where the user or User Settings Level must make connections.
Signature:
HRESULT GetHomeIPString([out, retval] BSTR *prop);