Questions tagged [managed]

Managed refers to code that requires and will only execute under the control of a Common Language Runtime (CLR). Any code written in C# or Visual Basic .NET is managed code.

890 questions
10
votes
2 answers

Is it possible to determine in which language a .NET Assembly was written ex post facto?

This started as a way to find C++/CLI and Managed C++ assemblies so that all classes internal to them could be tested to ensure all inherited methods were being reimplemented. I would like to add this as a build process step to ensure that it never…
Rick Minerich
  • 3,078
  • 19
  • 29
10
votes
1 answer

.NET wrapper for Windows API functionality

Does anyone know of a .NET managed wrapper around Windows API functionality that is not available in the .NET framework itself? Areas such as window creation and display styles, common UI control manipulation, keyboard/mouse input, file and disk…
Ash
  • 60,973
  • 31
  • 151
  • 169
10
votes
2 answers

C# -- Create Managed Array from Pointer

I'm trying to create a Managed Array of doubles from an array of bytes. I have the problem working currently, but I wanted to optimize. Here's some code that I would like to work: private unsafe static double[] _Get_Doubles(byte[] _raw_data) { …
lmat - Reinstate Monica
  • 7,289
  • 6
  • 48
  • 62
10
votes
2 answers

Scratch memory in a managed environment

I'm working on a fluid simulation in C#. Each cycle I need to calculate the velocity of the fluid at discrete points in space. As part of that calculation, I need a few tens of kilobytes for scratch space to hold some double[] arrays (the exact…
Jay Lemmon
  • 1,158
  • 1
  • 8
  • 22
9
votes
4 answers

Memory allocation for variable declared in class

As Value type variable allocates memory in Stack whereas Reference type allocates it in Heap. So how the memory allocated when a value type variable (e.g. int i = 4;) is declared in the reference type (e.g. in a class). How the overall memory…
usr021986
  • 3,421
  • 14
  • 53
  • 64
9
votes
3 answers

How do I show Error Message using Managed Custom Actions with Windows Installer

I am writing a managed custom action. I am using the DTF Framework from Windows Installer Xml to wrap the managed dll into a usable CA dll. The CA does what it is supposed to, but I am still having trouble with error handling: Dim record As New…
Mephisztoe
  • 3,276
  • 7
  • 34
  • 48
9
votes
1 answer

C# NHibernate & Oracle Managed Client

I have a big project that conceals another 16 project (Tests, Webs & App like Core, Email etc:.). I use C# MVC4 for my main website project. If I use a non Managed Client need me to do a project folder /bin recorded library Oracle.DataAccess.dll and…
Jan Sršeň
  • 1,045
  • 3
  • 23
  • 46
9
votes
5 answers

Performance of Calling Unmanaged .dll from C#

How long is the typical overhead added by calling a .dll written in C++ from a C# application using the following syntax? [DllImport("abc.dll", EntryPoint = "xcFoo", CallingConvention = CallingConvention.Cdecl)] public extern static Result Foo(out…
Michael Covelli
  • 2,113
  • 4
  • 27
  • 41
9
votes
1 answer

How to get Visual Studios build system to understand unmanaged dependencies of managed dlls?

When building managed code Visual Studio correctly (and recursively) copies dlls of referenced managed projects to the output folder of the project being build. However, if one the of those references is a managed DLL that depends on unmanaged dlls…
Ziphnor
  • 1,022
  • 1
  • 8
  • 17
8
votes
3 answers

Arrays of strings in Managed C++

I'm trying to write an application in Managed C++, but I cannot work out how to declare an array of strings. String^ linet[]; throws an error 'System::String ^' : a native array cannot contain this managed type So I suppose there's a different…
Jonathan Prior
  • 6,114
  • 7
  • 29
  • 26
8
votes
2 answers

Using Java JAR file in .NET

What options / methods / software are available to convert a JAR file to a managed .NET assembly? Please provide all commercial and non-commercial methods in the answer. These don't include solutions which require Java to be installed on the host…
Maltrap
  • 2,620
  • 1
  • 33
  • 32
8
votes
2 answers

When I run my C# application, Visual Studio reports that it has loaded a managed binary with (what looks like) a randomly generated name

When I run my C# application, Visual Studio reports that it has loaded a managed binary with (what looks like) a randomly generated name. For example: 'WindowsFormsApplication1.vshost.exe' (Managed): Loaded…
crdx
  • 1,412
  • 13
  • 26
8
votes
2 answers

What is the difference between managed and unmanaged DLL

I am a newbie....I would really like to know detailed difference between two, and when to use these?
nightWatcher
  • 1,051
  • 3
  • 15
  • 28
8
votes
3 answers

Wrapping unmanaged C++ with C++/CLI - a proper approach

as stated in the title, I want to have my old C++ library working in managed .NET. I think of two possibilities: 1) I might try to compile the library with /clr and try "It Just Works" approach. 2) I might write a managed wrapper to the unmanaged…
Jamie
  • 1,092
  • 3
  • 22
  • 44
8
votes
3 answers

What is the most efficient way to update the value of all or some managed objects in Core Data in Objective-C

I've googled and researched but am not able to find the best way to iterate through all or some managed objects in my Data Model and update an attribute value in each of them, in my situation, update to the current date. The managed object context…
Coy
  • 83
  • 1
  • 3