if (NS_SUCCEEDED(supports->QueryInterface(nsCOMTypeInfo<nsIInputStream>::GetIID(), (void**)&inStr))) {
if (NS_SUCCEEDED(supports->QueryInterface(NS_GET_IID(nsIInputStream), (void**)&inStr))) {
NS_COM nsresult NS_NewTypicalInputFileStream(    nsISupports** aResult,    const nsFileSpec& inFile    /*Default nsprMode == PR_RDONLY*/    /*Default accessmode = 0700 (octal)*/)// Factory method to get an nsInputStream from a file, using most common options//----------------------------------------------------------------------------------------{  // This QueryInterface was needed because NS_NewIOFileStream  // does a cast from (void *) to (nsISupports *) thus causing a   // vtable problem on Windows, where we really didn't have the proper pointer  // to an nsIInputStream, this ensures that we do #if 1    nsISupports    * supports;    nsIInputStream * inStr;    nsresult rv = NS_NewIOFileStream(&supports, inFile, PR_RDONLY, 0700);    *aResult = nsnull;    if (NS_SUCCEEDED(rv)) {      if (NS_SUCCEEDED(supports->QueryInterface(nsCOMTypeInfo<nsIInputStream>::GetIID(), (void**)&inStr))) {        *aResult = inStr;      }      NS_RELEASE(supports);    }    return rv;#else    return NS_NewIOFileStream(aResult, inFile, PR_RDONLY, 0700);#endif}