Use the ICIServer interface GetLocalIP method to find the local IP address.
Signature:
HRESULT GetLocalIP(
[in] long nIP,
[out, retval] BSTR *prop);