Hello All,
 
 I am trying to obtain a pointer to the dowload manager component, but the nsIServiceManager::GetServiceByContractId()  method  simply causes an access violation when I call it this way :
 
 unRetVal = spiServManager -> GetServiceByContractID("@mozilla.org/download-manager;1",
                                                     NS_GET_IID(nsIDownloadManager),
                                                     getter_AddRefs(spiGestorDownload));
 
 
 
I have already tried to call it this way
 
 unRetVal = spiServManager -> GetServiceByContractID("@mozilla.org/download-manager;1",
                                                     NS_GET_IID(nsISupports),
                                                     getter_AddRefs(spiGestorDownload));
 
but the result was precisely the same :(
 
Is the ContractId wrong ? But even so , the method should report failure and not causing an access violation
 
Has anyone already experienced this strange behavior?
Can anyone kindly give me a help with this issue, please?
 
Thank you very much in advance
 
Oliveiros

Reply via email to