托管与非托管问题 [英] managed vs. unmanaged question

查看:77
本文介绍了托管与非托管问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解托管代码提供的基础知识,如果您允许使用非托管代码,则可以自行打开安全问题。我们已经有了相当数量的VB6代码来包含COM DLL。如果我们把一些包裹在我们的代码周围,或留下一些asis。是什么让我们现有的生产代码''邪恶'只是因为它现在被认为是''非管理''?


它看起来像一个简单的niave问题,但是来自MS的托管

和非托管代码的定义没有提供足够的细节来解释为什么

非托管代码本身就是坏或坏。


我理解我们现有的一组程序员可能会变得邪恶,一旦我们安装了

..Net并开始转换为托管代码,但现在决定是

在我们所有代码转换之前最后一次是邪恶的他们在非托管部分做了一些

恶意事件...


我也理解任何不良行为可能仍然是不良行为,如果它们没有被改写为.Net兼容的工具 - 比如可能的内存泄漏

或者其他什么,事情如此罕见或良性,甚至没有排队等待研究/修复
- 仍将是il l-behaved。


但是非托管代码的恶意是什么......?公司正逐步淘汰

非托管代码,因为它不受管理。然而,在.Net之前这个相同的代码

很棒。

问候,


doug

I understand the basics of what managed code offers and that you open
yourself up to security issues if you allow unmanaged code. We already have
a decent amount of VB6 code to include COM DLLs. If we put wrappers around
some of our code or leave some "asis" what makes our existing production
code ''evil'' just because it is now considered ''unmanaged''?

It may seem like a simple niave question, but the definitions for managed
and unmanaged code from MS don''t provide enough detail to explain why
unmanaged code, in and of itself is bad or evil.

I understand our existing group of programmers might become evil once we get
..Net installed and begin converting to managed code, but decide now is the
last time to be evil before all our code is converted and they do some
malicious things in the unmanaged portions...

I also understand any ill-behaved programs might still be ill-behaved if
they aren''t rewritten in .Net compliant tools - like possible memory leaks
or whatever, things so infrequent or benign as to not even be on queue to be
researched/fixed - will still be ill-behaved.

But what is evil about unmanaged code....? Companies are phasing out
unmanaged code because it is unmanaged. Yet, prior to .Net this same code
was wonderfull.
regards,

doug

推荐答案



" doug" < DS **** @ pacbell.net>写了

"doug" <ds****@pacbell.net> wrote
我了解托管代码提供的基础知识,如果允许非托管代码,则自行打开安全问题。我们已经有了相当数量的VB6代码来包含COM DLL。如果我们把一些包装在我们的一些代码周围或留下一些asis是什么让我们现有的生产代码''邪恶'只是因为它现在被认为是''不受管理''?
I understand the basics of what managed code offers and that you open
yourself up to security issues if you allow unmanaged code. We already have
a decent amount of VB6 code to include COM DLLs. If we put wrappers around
some of our code or leave some "asis" what makes our existing production
code ''evil'' just because it is now considered ''unmanaged''?




谁说它是邪恶的? MSFT投入了大量时间和精力将旧的

与新的混合。似乎有人带领你走近死胡同...


对于MSFT的观点,你可能想要坚持下去:

http://msdn.microsoft.com/theshow/Ep...44/default .asp


HTH

LFS



Who said it was evil? MSFT has invested time and effort in mixing the old
with the new. It seems someone has lead you down a blind alley way...

For the MSFT perspective, you might want to sit through this:

http://msdn.microsoft.com/theshow/Ep...44/default.asp

HTH
LFS


我有点儿舌头,只是一点点。但是我读到的所有内容都有关于管理代码的专业版和运行代码并且在混合的

环境中运行的一些警告 - 安全风险和诸如此类的东西,以及我说,企业

架构策略正在升级,以使非托管代码过时。


如果托管代码的唯一问题是它运行CLR和''非管理代码'的主持下没有 - 谁在乎。


doug

Larry Serflaten < SE ******* @ usinternet.com>在留言中写道

新闻:O4 ************** @ tk2msftngp13.phx.gbl ...
I''m being a little tongue-in-cheek, just a little. But everything I read
has these caveats about pro''s/con''s of managed code and running in a mixed
environment - security risks and whatnot, and as I stated, corporate
architecture policies are being upgraded to make unmanaged code obsolete.

If the only thing about ''managed code'' is that it runs under the auspices of
the CLR and ''unmanaged code'' doesn''t - who cares.

doug
"Larry Serflaten" <se*******@usinternet.com> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...

" ;道格" < DS **** @ pacbell.net>写了

"doug" <ds****@pacbell.net> wrote
我了解托管代码提供的基础知识,如果允许非托管代码,则自行打开安全问题。我们已经
有相当数量的VB6代码来包含COM DLL。如果我们在一些代码周围放置包装
或留下一些asis是什么让我们现有的生产代码''邪恶'只是因为它现在被认为是''不受管理''?
I understand the basics of what managed code offers and that you open
yourself up to security issues if you allow unmanaged code. We already have a decent amount of VB6 code to include COM DLLs. If we put wrappers around some of our code or leave some "asis" what makes our existing production
code ''evil'' just because it is now considered ''unmanaged''?



谁说它是邪恶的? MSFT投入了大量时间和精力将旧的
与新的混合。似乎有人带领你走近死胡同...

对于MSFT的观点,你可能想要坚持下去:

http://msdn.microsoft.com/theshow/Ep...44/default.asp

HTH
LFS



Who said it was evil? MSFT has invested time and effort in mixing the old
with the new. It seems someone has lead you down a blind alley way...

For the MSFT perspective, you might want to sit through this:

http://msdn.microsoft.com/theshow/Ep...44/default.asp

HTH
LFS



Doug,


你用非托管代码做的一切都没有错,

然而程序变得越来越大。


Witch意味着你必须处理非托管代码更多还有更多dll',

,内存泄漏的变化越来越高,你必须写很多东西,只需要你做记忆管理。在我看来,这是一些

的好处,其中托管代码具有较少的优惠。改变了。不是托管代码

确实保证你不会存在这些问题,但更容易处理




所以当你和那些花费大量资金解决问题的人在上面写的并且希望保持这样的情况时,只需使用你的非托管代码。


只是我的想法,


Cor


" doug" < ds **** @ pacbell.net>
Doug,

When you do everything right with unmanaged code there is nothing wrong,
however programs become huger and huger.

Witch means that you have to handle with unmanaged code more and more dll''s,
that the change on memoryleaks become higher and higher, that you have to
write a lot, only to do you memorymanagement. This are in my opinion some
benefits where managed code has "less" change on that. Not that managed code
does guarantee you that those problems will not exist, however it is easier
to handle.

So when you are with those who spent a lot of money solving things as I
wrote above and want to keep that like it is, just use your unmanaged code.

Just my thought,

Cor

"doug" <ds****@pacbell.net>
我是一个小小的舌头,只是一点点。但是我读到的所有内容都有关于管理代码的专业/控制以及在混合环境中运行的这些警告 - 安全风险等等,正如我所说,公司
架构策略正在升级,以使非托管代码过时。

如果托管代码的唯一之处在于它是在CLR和'的主持下运行的。 '非托管代码''不 - 谁在乎。

doug
I''m being a little tongue-in-cheek, just a little. But everything I read
has these caveats about pro''s/con''s of managed code and running in a mixed
environment - security risks and whatnot, and as I stated, corporate
architecture policies are being upgraded to make unmanaged code obsolete.

If the only thing about ''managed code'' is that it runs under the auspices
of
the CLR and ''unmanaged code'' doesn''t - who cares.

doug



这篇关于托管与非托管问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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