Hi

I had a similar problem some time ago.

The nsISeekableStream IID changed from gecko 1.7 to 1.8, it is not frozen.

One possibility is that u are trying to get the interface with the wrong IID

Oliveiros

----- Original Message ----- From: <[EMAIL PROTECTED]>
Newsgroups: netscape.public.mozilla.xpcom,netscape.public.mozilla.embedding
To: <mozilla-xpcom@mozilla.org>
Sent: Friday, December 16, 2005 1:40 AM
Subject: Can't do_QueryInterface for nsISeekableStream!


Hi there,

I try to access post data from a form submitted. I have nsIInputStream
but I just can't call QueryInterface to get nsISeekableStream.  Please
let me know what I did wrong.  Code below:

nsCOMPtr<nsIUploadChannel> pUploadChannel =
do_QueryInterface(pHttpChannel);
if(pUploadChannel) {
     nsCOMPtr<nsIInputStream> pInputStream;
     pUploadChannel->GetUploadStream(getter_AddRefs(pInputStream));
     if(pInputStream) {
          nsCOMPtr<nsISeekableStream> pSeekableStream =
do_QueryInterface(pInputStream)
if (pSeekableStream) {
      pSeekableStream->Seek(nsISeekableStream::NS_SEEK_SET, 0);
                     // it's never executed
}
     }
}

I also try to call QueryInterface from nsIInputStream like:
pInputStream->QueryInterface(NS_GET_IID(nsISeekableStream),
getter_AddRefs(pSeekableStream));

But I get the same result.  What did I do wrong?
I call Available from pInputStream and the result is > 0.  I suppose
that I have pInputStream.

Thanks,
-Dark

_______________________________________________
Mozilla-xpcom mailing list
Mozilla-xpcom@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-xpcom

_______________________________________________
Mozilla-xpcom mailing list
Mozilla-xpcom@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to