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
2
votes
2 answers

Is C# unsafe code managed?

If you wrote a C# program and part of the code was written using the unsafe key word, would that code still be considered "managed" code? ie. would it be running under the CLR?
David Klempfner
  • 8,700
  • 20
  • 73
  • 153
2
votes
1 answer

How to pass parameter that can be of type int/double/string/int[] from C# to native C?

Can it be done something like this: Native DLL: void SetFieldValue(const char *Field, void *pValue, int Count) { char *StrValue; int *IntArrayValue; if (!strcmp(Field, "StrField")) { StrValue = malloc((Count + 1) *…
char m
  • 7,840
  • 14
  • 68
  • 117
2
votes
5 answers

Modifying method return value for managed code in Visual Studio 2010 debugger

Say I have this C# method: public bool GetVal() { return a1 == b1 || c1 == d1 || GetE1() == GetF1(); // Illustrating complicated logic here.. } I don't want to modify the content of the variables / return values of methods in the statement…
rickythefox
  • 6,601
  • 6
  • 40
  • 62
2
votes
1 answer

Have Unmanaged c++ code call managed c++ code that calls c# code

I'm having trouble figuring out exactly how to reference managed c++ code that calls c# code from unmanaged c++ code. Let me throw out a few scenarios: I have my unmanaged code reference and call my managed code, my managed code's call to my c#…
Wes
  • 77
  • 7
2
votes
3 answers

Convert array^ to int*

how can I convert array^ to int*?
user415789
2
votes
1 answer

Debugging both, native (ANSI C DLL) and managed (C# Assembly) code

I'm having some troubles debugging a solution which contains both a native ANSI C DLL project and a managed C#/WPF application project. I call the functions exported by the DLL using the LoadLibrary/GetProcAddress Win32 API functions (DllImport…
Dominik
  • 21
  • 2
2
votes
3 answers

How to Create a Managed Path through SharePoint Object Model

This is a question for a WSS/SharePoint guru. Consider this scenario: I have an ASP.Net web service which links our corporate CRM system and WSS-based intranet together. What I am trying to do is provision a new WSS site collection whenever a new…
Jazza
  • 1,042
  • 1
  • 9
  • 22
2
votes
1 answer

Interop question about StringBuilder

I am calling a C# method from C code. The C# method: [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void p_func(StringBuilder arg); public static void callback(StringBuilder arg) { …
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
2
votes
1 answer

How to change the value of a managed variable?

My boolean variable can be referenced using the syntax MPrime.exe Spirit.MPrimeComServerManager._isComServerReady I have tried using the syntax ?? MPrime.exe Spirit.MPrimeComServerManager._isComServerReady=1 and I am not sure how to use e*…
2
votes
1 answer

The Symbol file MyFile.pdb does not match the module

I've searched on this issue, and found many flavors and ideas but no real solutions. So, donning my asbestos suit and hoping for the best, I'm going to dare ask it again. I have managed C# code that calls managed C++ code, which in turn calls…
Wonko the Sane
  • 10,623
  • 8
  • 67
  • 92
2
votes
1 answer

Accessing GetConsoleHistoryInfo() from managed code

I've got a vaguely Java background and just installed Visual Studio Community 2015. Playing about with it so have a console app up and running and wanted to use above function after attaching to a different Console. Trouble is I have no idea about…
user1561108
  • 2,666
  • 9
  • 44
  • 69
2
votes
1 answer

Is it possible to determine the managed pipeline IIS7 is running under in ASP.NET?

Is it possible to determine the managed pipeline IIS7 is running under in ASP.NET?
Petras
  • 4,686
  • 14
  • 57
  • 89
2
votes
2 answers

Anyone port IJG JPEG code to C#?

Has anyone ported IJG JPEG code to C#? Are there any purely-managed JPEG libraries with source available? I don't much care about the license, as I just want to use it as a learning experience, not actually use it. Performance isn't a huge issue…
David Crowell
  • 3,711
  • 21
  • 28
2
votes
1 answer

Thread stuck in mutex wait while searching in Boost Interprocess managed_shared_memory

We are using boost::interprocess::managed_shared_memory. Recently while testing we found that after process crash threads searching in shared memory got stuck in manage_shared_memory APIs. My initial observation is that m_header recursive lock…
Aditya
  • 21
  • 2
2
votes
1 answer

app crashes when closing - using mixed mode DLL

I'm getting an app crash when the program closes. Otherwise it runs fine. Setup: - Visual Studio 2012 (x64 Windows 7) - mixed C++/CLI with native code DLL (native code is Boost Asio) - CLR console application linked with the DLL When I "debug" the…
Skippy VonDrake
  • 806
  • 8
  • 21