Where is IFileOperation implemented (and how can I verify this)?

↘锁芯ラ 提交于 2021-01-28 03:26:35

问题


I am trying to find out where IFileOperation is implemented in Windows 7. As far as I understand from the MSDN page it is in shell32.dll.

So, I checked all the COM objects in shell32.dll using a DLL export viewer (from NirSoft) and IFileOperation is not one of them.

I searched the registry for the CLSID_FileOperation {3ad05575-8857-4850-9277-11b85bdb8e09} and I found (as far as I understand) that it is in shell32.dll.

But how can that be if I couldn't find that COM export using DLL export?


回答1:


A DLL doesn't need to export anything special to implement that interface. The registry tells the OS what DLL implements the interface. When a program calls CoCreateInstance, the OS can look up the given CLSID in the registry. The OS then loads the associated DLL and calls its DllGetClassObject function to get an IClassFactory object. The OS then uses that interface to get something that implements the requested interface.



来源:https://stackoverflow.com/questions/5010620/where-is-ifileoperation-implemented-and-how-can-i-verify-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!