Need help, anyone is familiar with COM?

來源: 0.02$ 2010-12-20 14:55:02 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (847 bytes)

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

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”