由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 小白问题:COM/ATL的CoCreateInstance怎么定位dll的?
相关主题
COM里CoCreateInstance为什么要用类厂?要写 Visual C 下的 DLL 东西
Question about COMHow to find the DLL dependency of an EXE file?
question about desk band object为什么我的visual C++ 找不到 "Stdafx.h" ?
how to resolve this problem?请教:how to call a COM object in a stored procedure? (转载)
c++设计一问:如何动态地调用不同的算法的dll ?how to link DLL staticly in visual c# ?
求助:expected class name before "(" tokenlinker problem in VC
Re: 一个DLL的问题请教一个弱弱问题,关于#include的pathname
Help: any good decompiler for DLLa simple DLL and EXE question
相关话题的讨论汇总
话题: com话题: dll话题: regsvr32话题: 注册表
进入Programming版参与讨论
1 (共1页)
d******i
发帖数: 7160
1
参考
http://topic.csdn.net/t/20040417/16/2977524.html
include了测试COM server的*_i.c文件,该文件定义了类和接口的guid值。
然后CoCreateInstance了一把。COM对象从dll中生成了。
条件是dll文件在测试COM server目录的debug子目录下,挪到别处的不行。
俺就不懂了靠着个.h/_i.c里面的破CLSID怎么就知道dll在哪儿呢?
我一开始怀疑是我的测试COM server项目做了什么注册,regedt32了一下,果然找到。
删了不含糊。
然后CoCreateInstance就不灵了。
想让他恢复工作只有regsvr32 那个COM的DLL(神奇的是注册表里还是啥都木有),
再regsvr32 /u 又不灵了。
俺就不明白了
1. 注册表里一开始那一笔是谁写进去的?我rebuild了COM server,CoCreateInstance
成功几次,一概不会让注册表里重现那个COM的dll。
2. regsvr32成功也不在注册表里存下这个dll的记录(又试了regedt32,还是没找到)。
3. 那么靠着这个破_i.c文件里的CLSID,technically是怎么定位对应COM的dll文件的?
现在脑子里全是问号。请指教。谢谢!
k**********g
发帖数: 989
2
They're all in the registry. Try use RegEdit.exe and do a full search using
the GUID (e.g. LIBID, APPID, IID, CLSID).
On 64-bit Windows, there are two separate parts of registry for the 32-bit
and 64-bit components respectively.
c*****m
发帖数: 1160
3
一般com的project里自动会有一个custom build command,在编译成功之后自动调用
regsvr32注册。
1 (共1页)
进入Programming版参与讨论
相关主题
a simple DLL and EXE questionc++设计一问:如何动态地调用不同的算法的dll ?
问个DLL调用问题求助:expected class name before "(" token
从DLL上看,能不能知道是哪个编译器编译出来的么Re: 一个DLL的问题
一个面试题Help: any good decompiler for DLL
COM里CoCreateInstance为什么要用类厂?要写 Visual C 下的 DLL 东西
Question about COMHow to find the DLL dependency of an EXE file?
question about desk band object为什么我的visual C++ 找不到 "Stdafx.h" ?
how to resolve this problem?请教:how to call a COM object in a stored procedure? (转载)
相关话题的讨论汇总
话题: com话题: dll话题: regsvr32话题: 注册表