I am using Microsoft Visual Studio .NET and have this line in my code
nsCOMPtr<nsIWebProgress>
progress(do_GetService(kDocLoaderServiceCID,&rv));The compiler says do_GetService is an undeclared identifier. I have "nsCOMPtr.h" in my include list. What other files should I include?
Also,
I try to replace the above line with this:
nsCOMPtr<nsIWebProgress> progress;
rv = servMan->GetService(kDocLoaderServiceCID, NS_GET_IID(nsIDocumentLoader),
getter_AddRefs(progress));
and this..
nsCOMPtr<nsIWebProgress> progress(do_GetService(kDocLoaderServiceCID,&rv));
if (progress)
progress->AddProgressListener(this, nsIWebProgress::NOTIFY_STATUS);
But my program crashes on exiting the function where this code is there. Is there anything wrong that I am doing with GetService.
Thank you.
