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
6
votes
1 answer

Any ideas how to integrate F# code with native C++?

I want to use some F# code in native C++. More precisely, I want to write some data structures in F# and then use them in my C++ code. I have no idea how can I mix managed F# with unmanaged C++. How can I create a glue layer?
Oleksandr Karaberov
  • 12,573
  • 10
  • 43
  • 70
6
votes
2 answers

Jetty for NET world

I am looking for the Jetty equivalent in the Net Framework world - managed code. Does it exist? I would like to use the library from an F#/C#/VB.net application. "Don't deploy your application in Jetty, deploy Jetty in your application."
dag
  • 288
  • 2
  • 10
5
votes
3 answers

Why can I not use Marshal.Copy() to update a struct?

I have some code intended to get a struct from a byte array: public static T GetValue(byte[] data, int start) where T : struct { T d = default(T); int elementsize = Marshal.SizeOf(typeof(T)); GCHandle sh =…
sebf
  • 2,831
  • 5
  • 32
  • 50
5
votes
2 answers

Using managed identities in queue triggers in azure functions

I'd like to use managed identities instead of username and password configured in the storage account connection. I only see the option to configure the queue trigger with a connection string, but can't add a managed identity to avoid secrets to be…
5
votes
4 answers

Using managed C++ dll from C#

I've created a dll using managed C++. Now I'm trying to use it from C#. I've added the Object to project references. Object browser shows the object in the dll correcly, path to the dll in object browser corresponds to the actual path. However, when…
martin
5
votes
2 answers

Pointer to managed array in C++/CLI

Alright, I know how you normally would declare a pointer: void SomeFunction(array ^managedArray) { pin_ptr managedArrayPtr = &managedArray[0]; } This works fine except when managedArray contains no elements. In that case, it throws…
user425451
  • 61
  • 1
  • 3
5
votes
1 answer

Hook a managed method at runtime in c#

I have a sealed class with a public method inside an assembly, I would like to add a logging system but unfortunatley I don't have the sources. So I was trying detour this method on a specific logging method and calling the original one on exit. The…
Luca Bottani
  • 93
  • 1
  • 9
5
votes
3 answers

Mixed Code (native, managed): how does it (technically) interoperate?

I basically understand the idea of managed and native code and their difference. But how is it technically possible for them to communicate with each other? Imagine the following example: I got some static or dynamic c++ library which is compiled…
little_planet
  • 1,005
  • 1
  • 16
  • 35
5
votes
1 answer

Between a jsf page and a managed bean, why the getter method is called twice

I have a jsf page with a form has an outputtext in it. The value of outputtext component is called from a backing bean (or managed bean). I know when I code it as #{MyBean.myString} Jsf rename it and calls getMyString() method. However the wierd…
javatar
  • 4,542
  • 14
  • 50
  • 67
5
votes
2 answers

Load Managed C++ Dll from Unmanaged C Dll?

I have an off the shelf product which supports custom plugins which need to be written in Unmanaged C. It doesn't support Managed Dll's and my language of preference is c#. The information which needs to be passed back to the off the shelf product…
CathalMF
  • 9,705
  • 6
  • 70
  • 106
5
votes
1 answer

How are C# and C++/CX objects related?

I have a WP C++ Runtime Component that is to be consumed by a C# WP application. In C++ Runtime Component, I have public interface class ICallback { public: virtual void DoSomething(); }; public ref class…
onmyway133
  • 45,645
  • 31
  • 257
  • 263
5
votes
3 answers

Get managed bean reference in another managed bean

I try to get instance of managed bean in another managed bean thanks to this BalusC post : here With findBean method, it's great, I retrieve my bean but with ManagedProperty I can not get my bean. My bean to inject is this one…
Olivier J.
  • 3,115
  • 11
  • 48
  • 71
4
votes
4 answers

Mixed management in C++

I have added a class to my program and tested it. I was really surprised that there was any real errors. Here is the code: #pragma once #include "Iingredient.h" #include #include using namespace std; ref class Recipe{ private: …
Povylas
  • 776
  • 4
  • 16
  • 31
4
votes
2 answers

How to execute managed code from unmanaged code?

Hold it right there! You may think this has already been asked millions of time and has been answered as many time as the Earth has spun around the Sun, but please bear with me on this one. My task is simple: In my C++ (Windows) program, I want to…
user25101622
  • 193
  • 2
  • 13
4
votes
1 answer

Catching EngineExecutionException

I have an application containing both managed and native code. The application currently has an unhandled exception filter, set via SetUnhandledExceptionFilter, which catches any critical errors, generates a minidump, records various application…
Andrew
  • 233
  • 3
  • 9