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
4
votes
2 answers
Searching Of Folders in Public Folders by giving its PATH Name
Is it possible to search for all folders and sufolders in public folders by giving the path of the folders by using Exchange Web Service(EWS) Managed Api?

user1891567
- 681
- 2
- 10
- 15
4
votes
4 answers
Is it possible to generate/produce a c0000005 Access Violation Exception in pure managed code?
I live in the belief that is not possible to produce / generate an Access Violation Exception in "pure" managed code in .Net. If one looks at .Net as flawless and does not use any external libraries (that is not managed) through for example…

Mattis
- 454
- 4
- 8
4
votes
4 answers
Breakpoint not hit in managed code
I have inherited an application consisting of a number of C#, C++/CLI and native C++ projects.
The app starts as an MFC application but loads the CLR during startup (via a process I'm not sure I fully understand yet†).
I've found that I can place…

Grhm
- 6,726
- 4
- 40
- 64
4
votes
2 answers
C++/CLI wrapper not working (LoaderLock exception)
I've made very simple wrapper for unmanaged C++ library (to be used with C#). Wrapper has one unmanaged class and one managed class. Managed class has private member that is of unmanaged class and uses it like that.
I've done very simple setup -…

xx77aBs
- 4,678
- 9
- 53
- 77
4
votes
1 answer
Is this possible? Calling managed c++ struct constructor in C#
I've got a managed c++ class/struct with constructors that take input. In C#, I can only "see" the default constructor. Is there a way to call the other constructors, without leaving managed code? Thanks.
Edit: In fact, none of its functions are…

Narf the Mouse
- 1,541
- 5
- 18
- 30
3
votes
2 answers
Are Metro style apps managed or native and if native how can they run on both arm and x86?
I originally assumed that Metro style apps were managed (.NET) assemblies whether they are written in C# or C++ and I thought C++ for Metro style apps would be similar in concept to C++/CLI.
However, I now heard on a DotNet Rocks podcast that Metro…

Andrew J. Brehm
- 4,448
- 8
- 45
- 70
3
votes
4 answers
How to invoke the screen saver in Windows in C#?
I'd like to invoke the user's screen saver if such is defined, in a Windows environment.
I know it can be done using pure C++ code (and then the wrapping in C# is pretty simple), as suggested here.
Still, for curiosity, I'd like to know if such…

Ron Klein
- 9,178
- 9
- 55
- 88
3
votes
8 answers
If ANSI C++ doesn't support multithreading, how can unmanaged C++ apps be multithreaded?
I have heard that C++ offers no native support for multithreading. I assume that multithreaded C++ apps depended on managed code for multithreading; that is, for example, a Visual C++ app used MFC or .NET or something along those lines to provide…
Phoetus
3
votes
1 answer
Passing unmanaged C++ object into managed C++ code
So as the title states, I am looking to pass an object that is defined in an unmanaged C++ project into a managed C++/CLI project (both projects are in the same solution) while still being able to access the same methods as in the unmanaged C++…

Brutick
- 83
- 1
- 9
3
votes
1 answer
Interoperability between unmanaged and managed C++ DLL
I currently have an old unmanaged C++ DLL using MFC. This DLL has a bunch of code which is multi-threaded and written back in 2003 using VC6. This code sadly doesn't work anymore.
I've been tasked with finding an alternative way of running this…

Brutick
- 83
- 1
- 9
3
votes
1 answer
Should I create a C++/CLI wrapper DLL for an unmanaged C++ DLL?
I have been provided with an unmanaged C++ DLL that contains several classes.
I need to be able to use some of these classes in C#. Based on my research so far, it sounds like I need to create a C++/CLI wrapper DLL that would handle converting…

user1040229
- 491
- 6
- 18
3
votes
1 answer
Using sizeof a Managed Structure in C#
I am trying to port C++ code to C#. The code is meant to register a window class using RegisterClassEx.
The C++ code has an object WNDCLASSEX wcex. Object wcex has a property
wcex.cbSize = sizeof(WNDCLASSEX);
In C#, I have defined the structure…

Jacob Quisenberry
- 1,131
- 3
- 20
- 48
3
votes
1 answer
C++/CLI: Define everything in .cpp or separate in .h or .cpp?
Putting all aesthetic considerations aside... Which alternative is preferrable? My main concerns are build times, keeping the code readable and easy to mantain, and of course, that it compiles.
I've seen most books define everything in a .cpp file,…

dario_ramos
- 7,118
- 9
- 61
- 108
3
votes
2 answers
C++ CLI gcnew undeclared identifier
String* response_Page="";
std::string http_Response;
//WinHttp Request
//http_Response append (pszOutBuffer);
response_Page = gcnew System::String(respstring);
I am trying to create a managed C++/CLI dll to be used in c#, new to C++, it is really…

Milan Solanki
- 1,207
- 4
- 25
- 48
3
votes
4 answers
class in managed c++ called from c#
I have a class decalred inside managed c++ dll as
public class IPHelper
{
public:
static void CheckIP(LPWSTR pSocketName);
static void DebugMessage(const wchar_t *str, ...);
private:
static DWORD GetIPInformation(PSOCKET_RECORD…

Moti
- 65
- 4