社区
ATL
帖子详情
一个关于COM接口的很简单的问题,高手们闭着眼睛都可以回答的
ajet
2002-06-24 09:20:23
只知一个Interface的GUID为"6C44DF74-72B9-4992-A1EC-EF996E0422D4",其它的什么都不知道的情况下,怎么得到它的CComPtr指针?请指教,谢谢!
...全文
262
7
打赏
收藏
一个关于COM接口的很简单的问题,高手们闭着眼睛都可以回答的
只知一个Interface的GUID为"6C44DF74-72B9-4992-A1EC-EF996E0422D4",其它的什么都不知道的情况下,怎么得到它的CComPtr指针?请指教,谢谢!
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
用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();
人生八大致命
问题
文章来源:http://www.kaifulee.
com
/modules/bbs/viewthread.php?tid=8662
问题
一:如果你家附近有一家餐厅,东西又贵又难吃,桌上还爬着蟑螂,你会因为它很近很方便,就一而再、再而三地光临吗?
回答
:你一定会说,这是什么烂
问题
,谁那么笨,花钱买罪受? 可同样的情况换个场合,自己或许就做类似的蠢事。 不少男女都曾经抱怨过他们的情人或配偶品性
ibm服务器双系统怎么选择,IBM笔记本 换系统 却 换成了双系统!問題在哪?
这个很
简单
吗。现在我
闭
着
眼睛
都装的好。但第一次可能觉得很难。安装前准备,找
一个
空白的分区,比如D盘第一步,找个winxp安装版的盘,放进电脑。第二步,重启电脑,按F12,选择光驱第三步,进入安装界面,安装到D盘。这三步是相当
简单
的,等同于普通的安装安装好后,只能进xp了,win7进不了,这个时候就要修复启动了在xp里先安装.NET Framework 2.0,再安装vistabootpro,用这个...
找到所有数组中消失的数字_【一点资讯】千万程序员的呼声:面试如何拿到大厂Offer?这份阅读量超过11W+的算法刷题宝典请你原地查收 www.yidianzixun.
com
...
如何才能通过面试拿到大厂Offer?“刷leetcode!”这是我听到最多的
回答
!现在越来越多的人应聘工作时都得先刷个几十百来道题,不刷题感觉都过不了面试。无论是面测试、算法工程师还是架构开发工程师,好像都得刷题,这么多人通过刷题过了面试,说明刷题对于找工作还是有帮助的。不过这其中有
一个
问题
:很多人虽然为了找工作刷了题,但是却不理解公司为何要采取这样的方式来考察求职者。还有很多人为此愤愤不平:“我...
Maven配置实战:安装、阿里云镜像与IDEA整合避坑指南
Java项目开发中,构建工具是自动化管理依赖、编译与打包的核心基础设施。Maven作为主流构建工具,通过pom.xml声明式管理第三方库,并利用标准生命周期简化构建流程。实际工程中,开发者常面临依赖下载缓慢、本地仓库占用系统盘、IDE与命令行环境不一致等痛点。合理配置Maven的settings.xml,包括自定义本地仓库位置并接入阿里云镜像,可显著提升构建效率。同时,在IDEA中切换至自装Maven并正确设置相关参数,能保证开发环境与团队CI链路一致。围绕常见配置误区,系统讲解Maven安装、环境变量配置
WorkBuddy开放平台接入实战:从零到第
一个
可用Agent
Agent开发的核心在于让智能体具备自主调用外部工具的能力,工具调用与Skill机制是突破对话玩具局限的关键。理解系统提示词、模型配置与上下文管理等工程要点,有助于构建真正能交付价值的智能体应用。开放平台将模型调度、工具执行和任务编排下沉为基础设施,开发者只需聚焦意图设计、工具设计和规则设计,即可大幅降低接入门槛。从账号认证、密钥配置到本地联调,再到发布为可调用的API,完整链路覆盖了Agent生命周期中的调试、安全防护、成本监控与版本迭代。本文以WorkBuddy开放平台为例,详细拆解个人开发者跑通Age
ATL
3,248
社区成员
48,530
社区内容
发帖
与我相关
我的任务
ATL
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
复制链接
扫一扫
分享
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章