return GET_INPUTSTREAM_PIPE(this)->QueryInterface(aIID, aInstancePtr);
if (aInstancePtr == nsnull) return NS_ERROR_NULL_POINTER; if (aIID.Equals(nsIBufferInputStream::GetIID()) || aIID.Equals(nsIInputStream::GetIID()) || aIID.Equals(nsIBaseStream::GetIID())) { nsIBufferInputStream* in = GetInputStream(); NS_ADDREF(in); *aInstancePtr = in; return NS_OK; } if (aIID.Equals(nsIBufferOutputStream::GetIID()) || aIID.Equals(nsIOutputStream::GetIID()) || aIID.Equals(nsIBaseStream::GetIID())) { nsIBufferOutputStream* out = GetOutputStream(); NS_ADDREF(out); *aInstancePtr = out; return NS_OK; } if (aIID.Equals(nsIPipe::GetIID()) || aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) { *aInstancePtr = this; NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE;
nsPipe::nsPipeInputStream::QueryInterface(const nsIID& aIID, void** aInstancePtr){    return GET_INPUTSTREAM_PIPE(this)->QueryInterface(aIID, aInstancePtr);}