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.
> 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?
> Enrico Albonico
> dev-embedding mailing list
> [hidden email] > https://lists.mozilla.org/listinfo/dev-embedding >