Need help, anyone is familiar with COM?

I'm having some troubles in passing an array of structures in the definition of COM interface. For example, I'm trying to define a series of variables Ids in one read function, say Read() and I'm expecting the reply function (using the same function Read()) will bring back an array of values that corresponds to the previously defined variable Ids:

[helpstring("method ReadVariables")] HRESULT ReadVariables([in] VARIANT varIds, [out] _valStruct* retVals);

For _valStruct, the definition is: struct _valStruct { int varId; double varVal; int timeStamp; double funcId; ....

}

I'm not familiar with COM and I just know some basic types, such as int, double, etc... I sincerely some experts here will give me some detailed example code or related information. Your help is greatly appreciated... Thanks!!!

所有跟帖: 

回复:Need help, anyone is familiar with COM? -HappyNow?!- 给 HappyNow?! 发送悄悄话 HappyNow?! 的博客首页 (64 bytes) () 12/20/2010 postreply 16:17:04

回复:回复:Need help, anyone is familiar with COM? -0.02$- 给 0.02$ 发送悄悄话 (818 bytes) () 12/20/2010 postreply 17:27:20

回复:回复:回复:Need help, anyone is familiar with COM? -HappyNow?!- 给 HappyNow?! 发送悄悄话 HappyNow?! 的博客首页 (1193 bytes) () 12/20/2010 postreply 18:34:47

回复:Need help, anyone is familiar with COM? -0.02$- 给 0.02$ 发送悄悄话 (667 bytes) () 12/20/2010 postreply 19:15:21

good to know...VARIANT -HappyNow?!- 给 HappyNow?! 发送悄悄话 HappyNow?! 的博客首页 (182 bytes) () 12/20/2010 postreply 19:26:59

回复:good to know...VARIANT -0.02$- 给 0.02$ 发送悄悄话 (271 bytes) () 12/20/2010 postreply 19:43:50

why don't you google it? tons of examples are posted on the we -taiwanpeople- 给 taiwanpeople 发送悄悄话 (0 bytes) () 12/20/2010 postreply 16:21:13

learn some C++ first. -ncpga- 给 ncpga 发送悄悄话 (0 bytes) () 12/20/2010 postreply 17:01:29

你自己一定要慢慢琢磨,其实不麻烦 -怪哉- 给 怪哉 发送悄悄话 怪哉 的博客首页 (137 bytes) () 12/20/2010 postreply 20:00:26

回复:你自己一定要慢慢琢磨,其实不麻烦 -0.02$- 给 0.02$ 发送悄悄话 (248 bytes) () 12/20/2010 postreply 22:38:51

回复:回复:你自己一定要慢慢琢磨,其实不麻烦 -怪哉- 给 怪哉 发送悄悄话 怪哉 的博客首页 (269 bytes) () 12/21/2010 postreply 07:09:06

怎么还在用COM?好的通用COM Array实现挺麻烦的 -techy- 给 techy 发送悄悄话 (0 bytes) () 12/22/2010 postreply 11:29:05

请您先登陆,再发跟帖!