指导我访问COM对象 [英] guide me in accessing COM objects

查看:60
本文介绍了指导我访问COM对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是C ++和COM的新手.

我需要在C(lab windows CVI)中实现客户端应用程序,服务器是c ++ COM对象.

我遵循的步骤
>使用Labwindows CVI active x控制器模板访问已注册的COM对象,输出是一个c文件,该文件是COM(接口)中类名的实现.
我可以直接从生成的函数中使用大多数函数,但是我需要实现一些事件函数,例如消息框事件,然后再使用它们.

我已经在C ++客户端示例中看到了一种访问方法,该方法实现Queryinterface函数,以IID_Unknown作为输入并返回接口指针(在所需类中为static_cast,为此使用static_cast)作为输出.
当我尝试在c中进行后续操作时,我对继承概念一无所知.

简而言之,我需要将IID Unknown发送给Queryinterface函数,并且应该获取消息框类型或其他类类型的接口指针...

对不起,很长的邮件,请指导我

在此先感谢:thumbsup :,
Satish

Hi,

I am new to C++ and COM.

I need to implement a client application in C(lab windows CVI), server is a c++ COM object.

steps followed by me
> accessed the registered COM object with Labwindows CVI active x controller template, output was a c file which is an implementation of the class names in COM (interfaces).

I can use the majority of the functions directly from the generated, but I need to implement some event functions, like message box events, and then use them.

I have seen one method of accessing in C++ client sample which implements Queryinterface function, takes the IID_Unknown as input and returns interface pointer(inhereted static_castof the required class, uses static_cast for that) as output.

When I try to follow up the same in c, I am lost with the inheritance concept.

In short I need to send IID Unknown to the Queryinterface function and should get the interface pointer of message box type or other class type ...

Sorry for the long mail,Please guide me

Thanks in advance:thumbsup:,
Satish

推荐答案

有关COM和C ..
http://www.codeproject.com/KB/COM/com_in_c1.aspx [ ^ ]
A good Article on COM and C.., Go through this this may helps you

http://www.codeproject.com/KB/COM/com_in_c1.aspx[^]


这篇关于指导我访问COM对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆