如何在c +++中调用wmi提供程序中的两个类 [英] how to call two class in wmi provider in c+++
问题描述
我已经创建了wmi提供商。
工作正常。
i有两个名称为
cObject1,cObject2。
这是我的dll的条目,如果我为cObject1创建对象,那么cObject1 funcaiton正在调用
那时我需要单独查询cObject1对象。
如果想同时调用这两个类意味着wmi查询,如果我做了cObject2,它也想要查询自己的函数并需要返回值。
I have create the wmi provider .
Its working fine.
i have two classes in that name as
cObject1, cObject2.
This is entry of my dll, if i create the object for cObject1 then cObject1 funcaiton are calling
That time i need to query the cObject1 object alone.
if want to call both the class at same time means wmi query if i did cObject2 also it suppose to query its own funcation and need to return the value.
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
}
对于这两个课程,我使用单个GUID
如何实现这一目标。
For both class i am using single GUID
how to achieve that.
推荐答案
您不能对两个不同的类使用相同的GUID。系统如何确定您指的是哪一个?请参阅 COM简介 - 它是什么以及如何使用它。 [ ^ ]。
You cannot use the same GUID for two different classes. How is the system expected to determine which one you are referring to? See Introduction to COM - What It Is and How to Use It.[^] for a useful article on COM.
这篇关于如何在c +++中调用wmi提供程序中的两个类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!