将Visual Studio外接程序从VC6移植到Visual Studio 2008 [英] Porting of Visual Studio Add-in from VC6 to Visual Studio 2008

查看:139
本文介绍了将Visual Studio外接程序从VC6移植到Visual Studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试将Visual Studio 6中的Visual Studio插件移植到Visual Studio 2008.基本代码是使用COM接口用VC ++编写的。



在检查Visual Studio 2008时,开发外接程序中的接口在Visual Studio 2008中是不同的。是否可以盲目地从Visual Studio 6移植到更高版本。选择以下哪个选项,使用Visual C ++ / CLR创建加载项或使用Visual C ++ / ATL创建加载项?哪些选项可从Visual Studio外接程序选项对话框中选择?如何移植Visual Studio 6中的现有接口?



我的要求是在Visual Studio 2008中列出添加为新工具栏。

我是使用COM和加载项的新手。所以如果有人可以帮助我,那将非常有帮助。



问候

Ria

Hi,
I am trying to port a visual studio add-in from Visual Studio 6 to Visual Studio 2008. The base code is written in VC++ using COM interface.

On checking Visual Studio 2008, the interfaces in developing Add-ins are different in Visual Studio 2008. Is it possible to blindly port from Visual Studio 6 to higher version. Which of the following option to choose, Create an add-in using Visual C++/CLR or create an add-in using Visual C++/ATL? Which all options to choose from Visual Studio Add-in options dialog? How to port the existing interfaces in Visual Studio 6?

My requirement is to list the add in as a new tool bar in Visual Studio 2008.
I am a new comer in using COM and Add-in''s. So it would be extremely helpful, if some one out there can help me.

Regards
Ria

推荐答案

这几乎是重写。



COM编程过于陈旧和不方便。请记住,创建COM是为了允许面向对象的编程和不同面向对象语言之间的互操作,而不是面向对象的API。现在,当我们拥有.NET时,为什么我们会继续使用这些拐杖? :-)



我建议你从头开始使用旧的实现仅供参考。



请参阅:

http://msdn.microsoft.com/en- us / library / 80493a3w.aspx [ ^ ],

http://www.c- sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx [ ^ ]。



此CodeProject文章也很有用: Visual Studio加载项库 [ ^ ]。







我我不确定你要问什么样的C ++移植,但如果你在谈论插件,你将不得不使用.NET,这比本机开发更顺畅。语言不能简单C ++;你将需要一个非常不同的东西,C ++ / CLI(或C#)。



请参阅:

http://en.wikipedia.org/wiki/C%2B%2B/CLI [ ^ ],

http://www.ecma-international.org/publications/standards/Ecma-372.htm [< a href =http://www.ecma-international.org/publications/standards/Ecma-372.htmtarget =_ blanktitle =New Window> ^ ],

http://www.gotw.ca/publications/C++CLIRationale.pdf [ ^ ]。



如果你在谈论本机C ++开发,我强烈建议学习非常好的C ++ 11。请参阅:

http://en.wikipedia.org/wiki/C%2B %2B11 [ ^ ],

http://en.cppreference.com/w/ [ ^ ]。



这是一个不错的选择教程: http://www.learncpp.com/ [ ^ ]。



新年快乐!



-SA
It''s pretty much re-writing.

COM programming was way too archaic and inconvenient. Remember that COM was created to allow for object-oriented programming and interoperation between different object-oriented languages for a platform with not object-oriented API. Now when we have .NET, why would we keep using those crutches? :-)

I would advise you start from scratch using your old implementation just for reference purposes.

Please see:
http://msdn.microsoft.com/en-us/library/80493a3w.aspx[^],
http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx[^].

This CodeProject article can also be useful: Visual Studio Add-in Library[^].



I''m not sure what kind of C++ porting are you asking about, but if you are talking about Add-Ins, you will have to work with .NET, which is much smoother than native development. And the language cannot be plain C++; you will need a very different thing, C++/CLI (or C#).

Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://www.gotw.ca/publications/C++CLIRationale.pdf[^].

If you are talking about native C++ development, I would highly recommend to learn very much improved C++11. Please see:
http://en.wikipedia.org/wiki/C%2B%2B11[^],
http://en.cppreference.com/w/[^].

This is a good tutorial: http://www.learncpp.com/[^].

Happy New Year!

—SA


这篇关于将Visual Studio外接程序从VC6移植到Visual Studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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