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.
Questions tagged [managed]
890 questions
3
votes
1 answer
Cannot inject bean into JSF managed bean with specific name in spring
In the following snippet, when I give the @ManagedBean a specific name, userService and authenticationService are not injected. But if I use only @ManagedBean without name, the injection works fine. Any idea?
@Component
@ManagedBean(name="user") //…

Sasue Nie
- 61
- 1
- 9
3
votes
1 answer
WM_COPYDATA from c++ to C#
I'm developing 4 applications (using founded examples in internet) with Visual Studio 2010: 2 in C++ MFC (named: SenderCpp and ReceiverCpp) and 2 in C# (named: SenderCsh and ReceiverCsh) to test the WM_DATACOPY interprocess communication.
My goal…

mais76
- 43
- 2
- 5
3
votes
1 answer
Crm 2011: Unmanaged changes to managed solution form gotcha
I am learning a lot about managed vs. unmanaged solutions these days, and I definately see a lot of benefits using managed solutions in production.
I see that the recommended pattern is to have a development environment where you work with unmanaged…

TMan
- 1,305
- 1
- 13
- 17
3
votes
2 answers
Lightweight x86 Emulator for .NET / Executing x86 code in a managed environment
Our company is migrating its entire product line from a C++ codebase to the .NET Framework. We have a very large codebase, and this migration is being done incrementally over the course of many years.
We would like to enjoy some of the benefits of…

Daniel Oberlin
- 91
- 1
- 6
3
votes
2 answers
Loader lock (regsvr32 R6033 error) with managed C++ dll
I have a C++ dll which implements several COM interfaces, that I'm trying to migrate to managed C++. I set the /clr compiler flag and changed the Runtime Library property from /MT to /MD to avoid the conflict between these two flags, but that's all…

flatline
- 42,083
- 4
- 31
- 38
3
votes
4 answers
Managed byte[] to unmanaged byte array using ATL/COM
I want to pass some image data from C# code to unmanaged C++ using ATL/COM
From C# code side i do something like this:
void SendFrame([In, MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_UI1)] ref byte[] frameData);
But I'm not sure…

Gediminas
- 1,830
- 3
- 27
- 47
3
votes
2 answers
PInvoke return struct with two dimensions array
I have struct which is defined in c++ Win32 DLL like the following:
typedef struct matrix
{
double** data;
int m;
int n;
} Matrix;
And there is a function:
Matrix getMatrix(void);
Matrix getMatrix()
{
Matrix mat;
mat.m = 2;
…

Sameh K. Mohamed
- 2,323
- 4
- 29
- 55
3
votes
1 answer
C# exception thrown from a C++ managed dll - EEFileLoadException * __ptr64
I get this error from within a normal C# console program that's consuming a DLL produced as the build output of a C++ CLI project. There I have a simple DumbThing public ref class with a static method. I'd like to simply call that function or at…

teodron
- 1,410
- 1
- 20
- 41
3
votes
2 answers
How do I call managed .NET code from my un-managed C++ code in Windows and vice versa?
I have a pure C++ application developed using VC 6.0. I would like this application to make use of a library developed in C#. How do I call the methods in the C# library from my native executable? I do not want to convert my un-managed C++ native…

msvcyc
- 2,569
- 4
- 24
- 30
3
votes
2 answers
How to convert a unmanaged double to a managed string?
From managed C++, I am calling an unmanaged C++ method which returns a double. How can I convert this double into a managed string?

stung
- 347
- 5
- 13
- 27
2
votes
3 answers
Linking to presentationcore.dll in mixed mode DLL
We have a mixed mode DLL written in C++ which wraps native C++ DLLs and exposes managed classes. In the exposed managed classes, we use method arguments of type Vector3D etc., which are part of PresentationCore.DLL.
Therefore, the mixed mode C++…

user816098
- 262
- 3
- 14
2
votes
2 answers
Debugging startup issues in mixed code applications
We have an application that is a C/C++/MFC desktop application, with some C++/CLI assemblies that allow us to access some managed code functionality. The app is crashing at startup in release mode only with the message
An unhandled exception of type…
user236520
2
votes
1 answer
WINFORM C++ Managed string->unmanaged string produces unexpected results when combined with fstream
Right. So I'm trying to do this:
String^ ai = textBox4->Text;
char* towrite = (char*) Marshal::StringToHGlobalAnsi(ai ).ToPointer();
Marshal::FreeHGlobal(IntPtr(towrite));
string write = string(towrite);
ofstream…

Caps
- 79
- 6
2
votes
2 answers
Translating unmanaged C++ code to managed C++ for calling from C#
I have some C# code that requires extensive binary manipulation, so I wrote an unmanaged C++ method to replace one of the C# methods. To my shock, is was 10 X slower. I ran a profile, and discovered the slowness comes from the overhead of calling…

IamIC
- 17,747
- 20
- 91
- 154
2
votes
2 answers
How can I pass an empty string buffer that can be written to from native to c#?
I'm trying to get a string from my managed code into my unmanaged code:
unmanaged dll:
typedef int (__stdcall * GetNameFromDictionaryCallback)(ULONGLONG id, WCHAR * name);
declspec(dllexport) void __stdcall…

Scleractinian
- 77
- 1
- 7