如何使用CLR编译ATL模块 [英] How to compile ATL module with CLR

查看:86
本文介绍了如何使用CLR编译ATL模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我已经阅读了这篇文章
http://msdn2.microsoft.com/en-us/library/ms235211.aspx

关于如何编译MFC / ATL代码,但我还有一个问题没有答案:


我应该有

CComModule _Module;

定义和

CInitInstance()

代码编译为管理或非托管代码?


感谢您的帮助,

Genady

Hi,

I''ve read the article at
http://msdn2.microsoft.com/en-us/library/ms235211.aspx
about how to compile MFC/ATL code, but I still have one question unanswered:

Should I have the
CComModule _Module;
definition and the
CInitInstance()
code compiled as manages or as unmanaged code?

Thanks for any help,
Genady

推荐答案

" Genady Beryozkin" <戈************* @ discussions.microsoft.com>写在

消息新闻:AF ********************************** @ microsof t.com ...
"Genady Beryozkin" <Ge*************@discussions.microsoft.com> wrote in
message news:AF**********************************@microsof t.com...


我已经阅读了这篇文章
http://msdn2.microsoft.com/en-us/library/ms235211.aspx
关于如何编译MFC / ATL代码,但我还有一个问题没有答案:

我应该有CComModule _Module;
定义和
CInitInstance()
编译为管理或非托管代码的代码?

感谢您的帮助,
Genady
Hi,

I''ve read the article at
http://msdn2.microsoft.com/en-us/library/ms235211.aspx
about how to compile MFC/ATL code, but I still have one question
unanswered:

Should I have the
CComModule _Module;
definition and the
CInitInstance()
code compiled as manages or as unmanaged code?

Thanks for any help,
Genady




以下是一些提示:


1)你应该在没有/ clr编译的文件中定义_Module。

2)你应该确保没有托管代码是在_Module

构建期间执行

3)你不应该使用#pragma unmanaged

4)你不应该编译你的所有项目文件/ clr


希望这有帮助



Here are some hints:

1) You should define _Module in a file compiled without /clr.
2) You should make sure that no managed code is executed during the
construction of _Module
3) You should not use #pragma unmanaged
4) You should not compile all your project files with /clr

Hope this helps


我恭敬地不同意Marcus。看起来你有一些旧的VC6

代码。在应用知识库文章中概述的步骤之前,我会先将代码升级到VC8。


Brian
I respectfully disagree with Marcus. It looks like you have some old VC6
code. I would upgrade the code to VC8 first before applying the steps as
outlined in the KB article.

Brian


" Brian Muth" < BM *** @ mvps.org>在消息中写道

新闻:ep ************** @ TK2MSFTNGP02.phx.gbl ...
"Brian Muth" <bm***@mvps.org> wrote in message
news:ep**************@TK2MSFTNGP02.phx.gbl...
我恭敬地不同意Marcus 。看起来你有一些旧的VC6
代码。在应用知识库文章中概述的步骤之前,我会先将代码升级到VC8。

Brian
I respectfully disagree with Marcus. It looks like you have some old VC6
code. I would upgrade the code to VC8 first before applying the steps as
outlined in the KB article.

Brian




嗨Brian ,


也许我现在太时差了,但是VC6不支持/ clr,所以

代码必须至少从VC6移植到更高版本VS版本已经。

鉴于问题涉及VC8文档的一篇文章,我认为它已经被移植到VC8了。但是,我同意你的意见,如果

项目被移植到VC7或VC7.1,它应首先被移植到VC8。


尊重,Marcus



Hi Brian,

maybe I am too jetlagged currently, but VC6 does not support /clr, so the
code must at least have been ported from VC6 to a higher VS version already.
Given that the question refers to an article of the VC8 documentation, I
assume it has been ported to VC8 already. However, I agree with you that if
the project is ported to VC7 or VC7.1, it should first be ported to VC8.

Respectfully, Marcus


这篇关于如何使用CLR编译ATL模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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