nsPipe::QueryInterface(const nsIID& aIID, void** aInstancePtr)
nsPipe::nsPipeInputStream::QueryInterface(const nsIID& aIID, void** aInstancePtr)
nsPipe::QueryInterface(const nsIID& aIID, void** aInstancePtr){    if (aInstancePtr == nsnull)        return NS_ERROR_NULL_POINTER;    if (aIID.Equals(NS_GET_IID(nsIInputStream))) {        nsIInputStream* in = GetInputStream();        NS_ADDREF(in);        *aInstancePtr = in;        return NS_OK;    }    if (aIID.Equals(NS_GET_IID(nsIOutputStream))) {        nsIOutputStream* out = GetOutputStream();        NS_ADDREF(out);        *aInstancePtr = out;        return NS_OK;    }    if (aIID.Equals(NS_GET_IID(nsIPipe)) ||        aIID.Equals(NS_GET_IID(nsISupports))) {        *aInstancePtr = this;        NS_ADDREF_THIS();        return NS_OK;    }    return NS_NOINTERFACE;}