NS_NewPipe

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NS_NewPipe

Enrico Albonico
Hi,
I am expanding the embedding examples for windows and trying to pass
data streams directly to the docShell with
docShell->LoadStream which takes as an input an nsIInputStream.

I can write to a nsIOutputStream and that is fine.

but if I want to use NS_NewPipe (in, out... I will have to change the
linking because i get an unresolved external error:

> Browser.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl
> NS_NewPipe(class nsIInputStream * *,class nsIOutputStream * *,unsigned int,unsig
> ned int,int,int,class nsIMemory *)" (?NS_NewPipe@@YAIPAPAVnsIInputStream@@PAPAVn
> sIOutputStream@@IIHHPAVnsIMemory@@@Z) referenced in function "long __stdcall Dlg
> Proc(struct HWND__ *,unsigned int,unsigned int,long)" (?DlgProc@@YGJPAUHWND__@@I
> IJ@Z)d
> Browser.exe : fatal error LNK1120: 1 unresolved externals

do I necessarily have to link against xpcom_core.lib?

because then it works, but the GRE is not enough anymore and some dlls
are needed (xpcom_core, nspr4, plc4, plcds4) in the path, just for 1
line of code.

Is there a way to circumvent this?

Thanks
Enrico Albonico
_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding
Reply | Threaded
Open this post in threaded view
|

Re: NS_NewPipe

Darin Fisher-2
NS_NewPipe is an internal API.  You can instantiate it via the
component manager via the @mozilla.org/pipe;1 contract ID.  Use
nsIPipe to configure the object.

Also, you might want to consider using nsIWebBrowserStream instead of
nsIDocShell::LoadStream.  nsIDocShell is an internal interface that is
not really intended to be used outside the internals of Mozilla.

-Darin


On 5/31/06, Enrico Albonico <[hidden email]> wrote:

> Hi,
> I am expanding the embedding examples for windows and trying to pass
> data streams directly to the docShell with
> docShell->LoadStream which takes as an input an nsIInputStream.
>
> I can write to a nsIOutputStream and that is fine.
>
> but if I want to use NS_NewPipe (in, out... I will have to change the
> linking because i get an unresolved external error:
>
> > Browser.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl
> > NS_NewPipe(class nsIInputStream * *,class nsIOutputStream * *,unsigned int,unsig
> > ned int,int,int,class nsIMemory *)" (?NS_NewPipe@@YAIPAPAVnsIInputStream@@PAPAVn
> > sIOutputStream@@IIHHPAVnsIMemory@@@Z) referenced in function "long __stdcall Dlg
> > Proc(struct HWND__ *,unsigned int,unsigned int,long)" (?DlgProc@@YGJPAUHWND__@@I
> > IJ@Z)d
> > Browser.exe : fatal error LNK1120: 1 unresolved externals
>
> do I necessarily have to link against xpcom_core.lib?
>
> because then it works, but the GRE is not enough anymore and some dlls
> are needed (xpcom_core, nspr4, plc4, plcds4) in the path, just for 1
> line of code.
>
> Is there a way to circumvent this?
>
> Thanks
> Enrico Albonico
> _______________________________________________
> dev-embedding mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-embedding
>
_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding