几何尺寸与公差论坛

 找回密码
 注册
查看: 1002|回复: 0

【转帖】vista and activex control

[复制链接]
发表于 2009-4-13 15:19:01 | 显示全部楼层 |阅读模式
vista and activex control
i have an addin written in c++ (com) which uses activex control. i create ithis control with the modelviewmanager.createfeaturemgrcontrol2 function.
on windowsxp it is working well but when i run the adding on vista it isn't. it seems there is a problem with activex initialization as feature manager tab is created.
using the activex from vba doesn't have the issue.
sw2008
edited: 03/18/2008 at 10:45 am by alexander aristov
alexander,
have you checked the interface typecasts? it can produce a very hard-tracing errors.
regards, basil
"and when you loose control,
you'll reap the harvest you have sown..." (c) pink floyd
solidworks 2008 x64 sp5.0 (production)
solidworks 2009 x64 sp2.0 (testing)
windows xp x64 sp2
core2quad 6600, 4gb ram, 500gb sata, ati firegl v7700 1024mb (softmodded from hd3850), 19" tft
basil, i'm pretty sure there is no problem of typecast. as i wrote it works well on windows xp and moreover after creating the feature manager tab with activex control i don't actually use the control and i don't obtain a reference on the control.
first, i obtain modelviewmanager from modeldoc2.
then i create the feature manager control with the string as simple as
pmdlviewmgr->createfeaturemgrcontrol2(path, clazz , lic, tooltip, swfeatmgrpanebottom, &featmgr)
this function is expected to create and init activex control and place it into a newly created tab.
i thought i used wrong progid which is set by the clazz variable (ccombstr) but i managed to create the tab with the controller using the same function in sw visual basic for app. so i suspect there is something hidden inside sw which prevents creating the control. i also tried to put the activex control into modelviewmanager (different from featuremanagerview)
pmdlviewmgr->addcontrol3(tooltip, clazz, lic,true, &punk)
but again it's working on winxp but it isn't on vista.
i tried to play around the license for the activex but my control doesn't require any license and so i provided an empty string. with other string it doesn't work on winxp either.
the issue has been solved. i passed strings as bstr which was ok with xp but with vista it should be ccombstr
alexander,
once i had the same stuck with that strings...so since that time i use only coms.
regards, basil
"and when you loose control,
you'll reap the harvest you have sown..." (c) pink floyd
solidworks 2008 x64 sp5.0 (production)
solidworks 2009 x64 sp2.0 (testing)
windows xp x64 sp2
core2quad 6600, 4gb ram, 500gb sata, ati firegl v7700 1024mb (softmodded from hd3850), 19" tft
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-5-28 18:59 , Processed in 0.034490 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表