IFileOperation在哪里实现(以及如何验证这一点)? [英] Where is IFileOperation implemented (and how can I verify this)?
问题描述
我试图找出在Windows 7中实现了 IFileOperation
的位置.据我从 MSDN页面所了解的,它位于shell32.dll中
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.
因此,我使用DLL导出查看器(来自NirSoft)检查了shell32.dll中的所有COM对象,而IFileOperation不是其中之一.
So, I checked all the COM objects in shell32.dll using a DLL export viewer (from NirSoft) and IFileOperation is not one of them.
我在注册表中搜索了 CLSID_FileOperation
{3ad05575-8857-4850-9277-11b85bdb8e09},发现(据我所知)它位于shell32.dll中.
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.
但是如果找不到使用DLL导出的COM导出怎么办?
But how can that be if I couldn't find that COM export using DLL export?
推荐答案
DLL不需要导出任何特殊内容即可实现该接口.注册表告诉OS哪个DLL实现该接口.当程序调用 CoCreateInstance
时,操作系统可以在注册表中查找给定的CLSID.然后,操作系统将加载关联的DLL,并调用其 DllGetClassObject
函数以获取 IClassFactory
对象.然后,操作系统使用该接口来获取实现请求的接口的东西.
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.
这篇关于IFileOperation在哪里实现(以及如何验证这一点)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!