managed-code

How do I avoid the loader lock?

烂漫一生 提交于 2020-01-15 06:35:09
问题 We have a managed app, that uses an assembly. That assembly uses some unmanaged C++ code. The Managed C++ code is in a dll, that depends on several other dlls. All of those Dlls are loaded by this code. (We load all the dll's that ImageCore.dll depends on first, so we can tell which ones are missing, otherwise it would just show up as ImageCore.dll failed to load, and the log file would give no clues as to why). class Interop { private const int DONT_RESOLVE_DLL_REFERENCES = 1; private static

Could this C++ project be decompiled with such tools like a .NET Reflector?

时间秒杀一切 提交于 2019-12-24 16:06:43
问题 I use Microsoft Visual Studio 2012 and I want to write an application in native C++. Reason why I don't want to use Manged Code (.NET) because I don't want that my application was decompiled back to the Source Code with such tools like a .NET Reflector, but it would be nice if I still could use UI (CLR Windows Form) in my application. But when I'm adding UI (CLR Windows Form) to my Win32 Project this message pops up: Does that mean that from now all my project won't be compiled as a native

Is there a common practice how to make freeing memory for Garbage Collector easier in .NET?

谁说胖子不能爱 提交于 2019-12-20 04:09:53
问题 I've been thinking if there's a way how to speed up freeing memory in .NET. I'm creating a game in .NET (only managed code) where no significant graphics is needed but still I would like to write it properly in order to not to lose performance for nothing. For example is it useful to assign null value to objects that are not longer needed? I see this in a few samples over Internet. 回答1: is it useful to assign null value to objects that are not longer needed? Generally, no. Most of the samples

What exactly is “managed” code?

匆匆过客 提交于 2019-12-17 22:34:54
问题 I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any .NET, VB, or C# stuff. What exactly does managed code mean? Wikipedia describes it simply as Code that executes under the management of a virtual machine and it specifically says that Java is (usually) managed code, so why does the term only seem to apply to C# / .NET? Can you compile C# into a .exe that contains the VM as

Is managed code is the only way to use SMO in c++?

走远了吗. 提交于 2019-12-11 05:23:17
问题 I have to work with SQLSERVER SMO in C++. Is Managed code is the only way to work with SQLSERVER SMO in C++ ? I have tried many ways.. but I found that using managed code is the only option. Are there other ways? 回答1: Technically, you can expose .NET assemblies to standard COM infrastructure, but that requires changes to the source code (see this). You may try and create a COM-aware wrappers around standard SMO objects and then use them as regular COM classes in C++. 来源: https://stackoverflow

VB.NET Socket Exception only while Debugging

蹲街弑〆低调 提交于 2019-12-11 04:21:17
问题 I have recently encountered some rather baffling behavior while up-converting a VB.NET solution from VS2005 to VS2010. For reference, the solution targets .NET 2.0 and was running without error in the debugger prior to the conversion. In addition to the IDE change, corporate has seen it fit to refresh my device from Win XP (x86) to Win 7 (x64). Now that I have converted the solution to VS2010, I receive a Socket exception as soon as the debugger loads (details below). This ONLY occurs in the

Why does C++ need language modifications to be “managed”?

此生再无相见时 提交于 2019-12-04 20:26:10
问题 Why can't a compiler be written that manages what needs to be managed in C++ code (i.e. to make it "CLR compatible")? Maybe with some compromise, like prohibiting void pointers in some situations etc. But all these extra keywords etc. What's the problem that has to be solved by these additions? I have my thoughts about some aspects and what might be hard to solve, but a good solid explanation would be highly appreciated! 回答1: I'd have to disagree with the answers so far. The main problem to

The speed of .NET in numerical computing

本秂侑毒 提交于 2019-12-03 04:22:50
问题 In my experience, .NET is 2 to 3 times slower than native code. (I implemented L-BFGS for multivariate optimization). I have traced the ads on stackoverflow to http://www.centerspace.net/products/ the speed is really amazing, the speed is close to native code. How can they do that? They said that: Q. Is NMath "pure" .NET? A. The answer depends somewhat on your definition of "pure .NET". NMath is written in C#, plus a small Managed C++ layer. For better performance of basic linear algebra

The speed of .NET in numerical computing

余生长醉 提交于 2019-12-02 17:37:36
In my experience, .NET is 2 to 3 times slower than native code. (I implemented L-BFGS for multivariate optimization). I have traced the ads on stackoverflow to http://www.centerspace.net/products/ the speed is really amazing, the speed is close to native code. How can they do that? They said that: Q. Is NMath "pure" .NET? A. The answer depends somewhat on your definition of "pure .NET". NMath is written in C#, plus a small Managed C++ layer. For better performance of basic linear algebra operations, however, NMath does rely on the native Intel Math Kernel Library (included with NMath). But

Is there a common practice how to make freeing memory for Garbage Collector easier in .NET?

风格不统一 提交于 2019-12-02 07:06:45
I've been thinking if there's a way how to speed up freeing memory in .NET. I'm creating a game in .NET (only managed code) where no significant graphics is needed but still I would like to write it properly in order to not to lose performance for nothing. For example is it useful to assign null value to objects that are not longer needed? I see this in a few samples over Internet. is it useful to assign null value to objects that are not longer needed? Generally, no. Most of the samples you'll see online that do this are by people that came to .Net from VB6, where this was a common best