社区
ATL
帖子详情
一个关于COM接口的很简单的问题,高手们闭着眼睛都可以回答的
ajet
2002-06-24 09:20:23
只知一个Interface的GUID为"6C44DF74-72B9-4992-A1EC-EF996E0422D4",其它的什么都不知道的情况下,怎么得到它的CComPtr指针?请指教,谢谢!
...全文
191
7
打赏
收藏
一个关于COM接口的很简单的问题,高手们闭着眼睛都可以回答的
只知一个Interface的GUID为"6C44DF74-72B9-4992-A1EC-EF996E0422D4",其它的什么都不知道的情况下,怎么得到它的CComPtr指针?请指教,谢谢!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
maphis
2002-06-24
打赏
举报
回复
你如果不知道CLSID的话,那么就意味着不能创建相应的实例,所以当然不能得到。
相关原理可以看看讲COM的书。
ajet
2002-06-24
打赏
举报
回复
到底能不能得到?
ultraboy
2002-06-24
打赏
举报
回复
其他什么都不知道,你得到指针能干嘛?
ajet
2002-06-24
打赏
举报
回复
maphis(bool bPoor=true) :谢谢你,谢谢你,太感谢你了!!!(真想亲你一口)
maphis
2002-06-24
打赏
举报
回复
有重定义发生,你可以去掉no_namespace参数,这样你使用的时候注意要加上namespace就可以了。
ajet
2002-06-24
打赏
举报
回复
volcary((冰火山):
我在导出类型库时出错,我是想导出MICROSOFT TTS 引擎的,在StdAfx.h中加入
#import "C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll" no_namespace
后编译出错,提示如下:
Compiling...
StdAfx.cpp
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding 'wireHWND' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding '_RemotableHandle' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding '__MIDL_IWinTypes_0009' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding 'IStream' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding 'ISequentialStream' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding '_LARGE_INTEGER' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding '_ULARGE_INTEGER' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding 'tagSTATSTG' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\stdafx.h(23) : warning C4192: automatically excluding '_FILETIME' while importing type library 'C:\Program Files\Common Files\Microsoft Shared\Speech\sapi.dll'
d:\abcddd\b\debug\sapi.tlh(3515) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3515) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3515) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3516) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3516) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3516) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3517) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3517) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3517) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3517) : warning C4129: 'A' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3518) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3518) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3518) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3518) : warning C4129: 'A' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3519) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3519) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3519) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3519) : warning C4129: 'V' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3520) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3520) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3520) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3520) : warning C4129: 'R' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3521) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3521) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3521) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3521) : warning C4129: 'A' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3522) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3522) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3522) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3522) : warning C4129: 'P' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3523) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3523) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3523) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3523) : warning C4129: 'R' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3524) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3524) : warning C4129: 'M' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3524) : warning C4129: 'S' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3524) : warning C4129: 'C' : unrecognized character escape sequence
d:\abcddd\b\debug\sapi.tlh(3551) : warning C4305: 'initializing' : truncation from 'const double' to 'const float'
d:\abcddd\b\debug\sapi.tlh(4511) : error C2011: 'IServiceProvider' : 'struct' type redefinition
d:\abcddd\b\debug\sapi.tlh(6132) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
d:\abcddd\b\debug\sapi.tlh(6695) : error C2039: 'RemoteQueryService' : is not a member of 'IServiceProvider'
c:\program files\microsoft visual studio\vc98\include\servprov.h(108) : see declaration of 'IServiceProvider'
Error executing cl.exe.
Creating browse info file...
b.exe - 2 error(s), 49 warning(s)
volcary
2002-06-24
打赏
举报
回复
1.在HKEY_CLASSES_ROOT\Interface\ 找到
项“6C44DF74-72B9-4992-A1EC-EF996E0422D4”
2.在其项TypeLib下找到GUID是CLSID
3.在HKEY_CLASSES_ROOT\CLSID\ 找到 该CLSID_GUID其中
如果是进程外则找\localserver其中就是本地COM组件
如果是进程内找\InProcServer32
4.注册你的DLL yourcom.dll -regserver32
5.#import "youcom.dll" no_namespace
6.定义 yourcomclassPtr cominter
7.cominter.cocreateinstance()
......//调用
8.cominter.Release();
学弟学妹要的Java学习路线我终于写完了
目录 学Java有哪些就业方向? 数据结构和算法 设计模式 计算机基础 Java 入门 Java
高手
进阶 基础框架(SSM) 微服务框架 常用中间件 数据库 分布式架构 必须掌握的工具软件 学习资源网站列表汇总 最后
回答
几个常见
问题
(FAQ) 这篇文章写的非常认真,足足花了两周时间,不是
简单
的资料聚合,我将多年的工作和学习经验写下来了,相信看完后你能有一种豁然开朗的感觉,这就是我要达到的目的,希望不要被打脸。 最近很多读者在问:Java 怎么学习啊?有没有什么学习路线?
一个
URL请求背后的逻辑
背景 本文来自于之前我发的一篇微博: 不过写这篇文章并不是为了帮大家准备面试,而是想借这道题来介绍计算机和互联网的基础知识,让读者了解它们之间是如何关联起来的。 为了便于理解,我将整个过程分为了六个
问题
来展开。 第
一个
问题
:从输入 URL 到浏览器接收的过程中发生了什么事情? 从触屏到 CPU 首先是「输入 URL」,大部分人的第一反应会是键盘,不过
【AI 天才研究院】DeepSeek R1 官方推荐 13 大提示词,普通人都能用出
高手
效果!
下面为大家整理了【AI 天才研究院】推荐的 DeepSeek R1 官方提示词库中的 13 大提示词样例。这套提示词设计得既
简单
又高效,无论你是编程新手还是内容创作爱好者,都能利用它们获得专家级输出效果。以下是详细介绍:代码改写提示词 用于让模型对给定代码进行修改与优化(例如纠错、添加注释、性能调优)。提示中会要求先解释原代码
问题
,再提出改进方案。代码解释提示词 让模型分析并解释代码的逻辑、功能及实现思路,帮助用户更好地理解代码内容。代码生成提示词 指导模型根据需求生成一段代码,比如用 HTML 编写
一个
小
完整的Java从小白到大牛的自学路线
我相信这些读者或多或少都有一些 Java 基础,但由于看不到全貌,学了一段时间很容易迷失。所以我在寻思着能不能写
一个
学习的地图或者路线,让读者能知道下一步该学什么,自己离大厂的 offer还有多远的距离。
一个
人最怕的不是路途遥远,而是看不到胜利曙光。这篇文章主要内容包括(干货满满):学Java有哪些就业方向?数据结构和算法设计模式计算机基础Java 入门Java
高手
进阶基础框架(SSM)微服务框架常用中间件数据库分布式架构必须掌握的工具软件学习资源网站列表汇总。
Java入门到架构师知识点整理,P8的技术大咖是这样通关的
一个
人最怕的不是路途遥远,而是看不到胜利曙光。我希望下面这篇文章能给你的学习之路带来一丝曙光,大家不妨试着读一下吧,如果有收获给我点个赞哟。 温馨提醒:这篇文章写着写着就一万字了,建议大家关注后再收藏,以防走丢。 这篇文章主要内容包括(干货满满): 学Java有哪些就业方向? 数据结构和算法 设计模式 计算机基础 Java 入门 Java
高手
进阶 基础框架(SSM) 微服务框架 常用中间件 数据库 分布式架构 必须掌握的工具软件 学习资源网站列表汇总 学习常见
问题
(FAQ) 买一瓶可乐,泡一杯咖啡
ATL
3,248
社区成员
48,529
社区内容
发帖
与我相关
我的任务
ATL
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
复制链接
扫一扫
分享
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章