Recently, I've been dealing with an error with accessing MAPI via the .NET framework (as described in this article). I am now left with a series of memory access violation errors.
最近,我一直在处理通过.NET框架访问MAPI的错误(如本文所述)。我现在留下了一系列内存访问冲突错误。
To get past the issues, I have been trying to use this 3rd party component, which has a Visual C++ core. Unfortunately - we are still having the same errors.
为了解决这些问题,我一直在尝试使用这个具有Visual C ++核心的第三方组件。不幸的是 - 我们仍然遇到同样的错误。
I've personally never used Visual C++, but my question is: if the C++ library is compiled using Visual Studio 2005, using Visual C++ - does the memory of the project become managed by the .NET framework, as well, which would therefore make it subject to the same issues as the .NET libraries we're using? Or am I barking up the wrong tree?
我个人从未使用过Visual C ++,但我的问题是:如果使用Visual C ++使用Visual C ++编译C ++库,那么项目的内存也会由.NET框架管理,因此会使它与我们正在使用的.NET库存在相同的问题吗?还是我在错误的树上吠叫?
3 个解决方案
#1
0
I'm not entirely sure what you're asking, but i'll give it a shot.
我不完全确定你在问什么,但我会试一试。
Visual C++ is a pure C/C++ compiler so has none of .NET's memory management, nor any of its runtime -- You have to manually call new and delete.
Visual C ++是一个纯C / C ++编译器,因此没有.NET的内存管理,也没有任何运行时 - 您必须手动调用new和delete。
.NET also provides C++/CLI, which is a slightly modified version of C++ that targets the .NET runtime, and is GC aware -- eg. its memory is managed by the .NET runtime.
.NET还提供了C ++ / CLI,这是一个针对.NET运行时的C ++的略微修改版本,并且具有GC感知功能 - 例如。其内存由.NET运行时管理。
Without more details about your bug I can't really make any suggestions, beyond suggesting that you make sure you use the appropriate GC guards, and the provide finalizers in any place they are needed.
没有关于你的bug的更多细节我不能提出任何建议,除了建议你确保使用适当的GC防护,并在任何需要的地方提供终结器。
#2
1
The two previous answers have mentioned "Managed C++", this is an old bolt-on that they did to allow you to use managed C++ in a .NET environment. It wasn't a first class citizen - unlike C++/CLI (link text. But to answer your original question, no, Visual C++ is not managed by the .NET runtime. Managed C++ & C++/CLI are.
之前的两个答案提到了“托管C ++”,这是一个很老的例子,他们允许你在.NET环境中使用托管C ++。它不是一流的公民 - 不像C ++ / CLI(链接文本。但是为了回答你的原始问题,不,Visual C ++不是由.NET运行时管理的。托管C ++和C ++ / CLI是。
#3
0
Unless you are using Managed C++ (which it doesn't sound like you are) then no, the memory is not managed by the CLR.
除非你使用Managed C ++(它听起来不像你),否则内存不是由CLR管理的。
The recommended method of talking to Exchange in .Net is via WebDAV.
在.Net中与Exchange交谈的推荐方法是通过WebDAV。
#1
0
I'm not entirely sure what you're asking, but i'll give it a shot.
我不完全确定你在问什么,但我会试一试。
Visual C++ is a pure C/C++ compiler so has none of .NET's memory management, nor any of its runtime -- You have to manually call new and delete.
Visual C ++是一个纯C / C ++编译器,因此没有.NET的内存管理,也没有任何运行时 - 您必须手动调用new和delete。
.NET also provides C++/CLI, which is a slightly modified version of C++ that targets the .NET runtime, and is GC aware -- eg. its memory is managed by the .NET runtime.
.NET还提供了C ++ / CLI,这是一个针对.NET运行时的C ++的略微修改版本,并且具有GC感知功能 - 例如。其内存由.NET运行时管理。
Without more details about your bug I can't really make any suggestions, beyond suggesting that you make sure you use the appropriate GC guards, and the provide finalizers in any place they are needed.
没有关于你的bug的更多细节我不能提出任何建议,除了建议你确保使用适当的GC防护,并在任何需要的地方提供终结器。
#2
1
The two previous answers have mentioned "Managed C++", this is an old bolt-on that they did to allow you to use managed C++ in a .NET environment. It wasn't a first class citizen - unlike C++/CLI (link text. But to answer your original question, no, Visual C++ is not managed by the .NET runtime. Managed C++ & C++/CLI are.
之前的两个答案提到了“托管C ++”,这是一个很老的例子,他们允许你在.NET环境中使用托管C ++。它不是一流的公民 - 不像C ++ / CLI(链接文本。但是为了回答你的原始问题,不,Visual C ++不是由.NET运行时管理的。托管C ++和C ++ / CLI是。
#3
0
Unless you are using Managed C++ (which it doesn't sound like you are) then no, the memory is not managed by the CLR.
除非你使用Managed C ++(它听起来不像你),否则内存不是由CLR管理的。
The recommended method of talking to Exchange in .Net is via WebDAV.
在.Net中与Exchange交谈的推荐方法是通过WebDAV。