Click here to Skip to main content
15,915,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating the instance of IQueryCancelAutoPlay. It failed all the time.
C++
IQueryCancelAutoPlay *cancelAP;

HRESULT hr = CoCreateInstance(__uuidOf(QueryCancelAutoPlay), NULL, CLSCTX_ALL, (void **) &cancelAP);

if (SUCCEEDED(hr)) {
  printf("Success\n");
  cancelAP->Release();
}
else {  // it failed
   printf("Failed: 0x%0x\n", hr);
}

What I have tried:

Just looking around on Google, many articles are stating that this happened because I am missing one important dll, specifically "ATL.dll or ATL70.dll";

ATL.dll is in my Windows\system32;

ATL70.dll is not where to be found. 

I will appreciate help from anybody that had solved this problome.
Posted
Updated 18-Jun-16 7:52am

1 solution

According to this article[^], ATL.dll not only has to be in system32 directory, but it should be registered using regsvr32.exe utility:
dos
regsvr32 ATL.dll

Did you try that already?
 
Share this answer
 
Comments
Member 12562336 18-Jun-16 14:12pm    
Yes, I registered atl.dll in system32 and sysWow64
I still have the problem.
It looks like I need atl70.dll. But to get download this.
Thank you/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900