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

How to pass SAFEARRAY of UDTs to unmaged code from C#

I also used VT_RECORD. But didn't got success in passing safearray of UDTs. [ComVisible(true)] [StructLayout(LayoutKind.Sequential)] public class MY_CLASS { [MarshalAs(UnmanagedType.U4)] public…
Milan Dhameliya
  • 129
  • 1
  • 10
3
votes
10 answers

What's the difference between Managed/Byte Code and Unmanaged/Native Code?

Sometimes it's difficult to describe some of the things that "us programmers" may think are simple to non-programmers and management types. So... How would you describe the difference between Managed Code (or Java Byte Code) and Unmanaged/Native…
Chris Pietschmann
  • 29,502
  • 35
  • 121
  • 166
3
votes
1 answer

Returning Managed C# List to Unmanaged C++ code

I have a C# dll ( for which register for COM interop option is set). This C# dll has the below interface and class interface IMyInterface { bool IsNameExists(string name); List GetNameList(); } public class MyClass :…
srajeshnkl
  • 883
  • 3
  • 16
  • 49
3
votes
2 answers

IIS7 Modules - managed or native?

as the old ISAPI filters are going to die sooner or later, I want to rewrite an old ISAPI filter that was used in IIS 6 into a module for use in IIS 7. The module will be used globally, meaning it will be used within each site, on a Windows Server…
Simon Linder
  • 3,378
  • 4
  • 32
  • 49
3
votes
1 answer

Managed c++ std::string not accessible in unmanaged c++

In unmanaged c++ dll i have a function which takes constant std::string as argument Prototype : void read ( const std::string &imageSpec_ ) I call this function from managed c++ dll by passing a std::string. When i debug the unmanaged c++ code the…
Radhesham
  • 31
  • 2
3
votes
2 answers

Unmanaged within Managed Vs. Pure unmanaged

Will Unmanaged code (CPP) operated by Managed code (C#) have the same preformance as if it was operated by another unmanaged code (does the stack operate the same etc)? I.e. - If I call code in MyCppApp from MyCs will it have the same performance as…
user3382570
3
votes
10 answers

How do I create a non managed Windows GUI in Visual C++?

When I create a 'Windows Forms Application', the resultant program is a managed one. Creating a 'Win32 Application' results in a native one, but when I try to add a form I'm informed that the project will be converted to CLI if I continue. How do I…
Dataflashsabot
  • 1,369
  • 5
  • 19
  • 24
3
votes
1 answer

Injecting a managed dll into a native process

I'm trying to inject a managed c# dll into a native executable. I'm injecting the following code into the executable in order to load the CLR. I know the injection works, because when I inject the code into cmd.exe it outputs correctly. I know that…
user3000212
  • 31
  • 1
  • 3
3
votes
1 answer

Salt-stack: replace/add minion name to file in managed file formula

I am using New Relic to monitor my Salt managed EC2 servers, and I am trying to insert a "hostname=minion-name" in the newrelic-sysmond confic file, so they show up in New Relic's dashboard with a reconizable name, instead of the EC2 default…
3
votes
2 answers

Accessing native C++ data from managed C++

I have an native C++ library which makes use of a large static buffer (it acquires data from a device). Let's say this buffer is defined like this: unsigned char LargeBuffer[1000000]; Now I would like to expose parts of this buffer to managed C++,…
Enrico Detoma
  • 3,159
  • 3
  • 37
  • 53
3
votes
3 answers

Visual Studio attach to managed process programmatically

I'm trying to programmatically attach to an IISExpress process for debugging. When using the Visual Studio attach to process window I have to select Managed Code as the type to attach to. If auto detect is selected instead, VS tries to debug…
Max
  • 1,543
  • 2
  • 16
  • 31
3
votes
0 answers

Why does this managed ODP.NET LDAP connecion attempt throw an OracleInternal.Network.AddressResolution?

I am trying to use the new managed OPD.NET driver version 4.121.1.0 This my appconfig file, The settings are copied from the ldap.ora
mrt181
  • 5,080
  • 8
  • 66
  • 86
3
votes
1 answer

What is the expected behavior of LoadLibrary() when called from an unmanaged process (native C++) on a managed assembly (C#)

I've added a hosting interface to a native C++ application which instantiates the CLR, creates a custom appDomainManager, and provides calls to load managed assemblies into the native process. In my native C++ LoadDLL() function I was expecting to…
NAW
  • 95
  • 9
3
votes
2 answers

How do I marshal a pointer to a series of null-terminated strings in C#?

I need some help with the following. I've got a c++ API (no access to source) and I'm struggling with the methods returning char* attributes, or returned structures containing char* attributes. According to the API's documentation the return value…
Jean
  • 33
  • 1
  • 5
3
votes
1 answer

How can I programmatically determine if a DLL is managed or unmanaged?

How can I, in a program, determine if a DLL is managed or unmanaged code? We're using this code to make sure all of our managed DLLs are MSIL. But it throws an exception on unmanaged DLLs so I need a way to first check if a DLL is managed.
David Thielen
  • 28,723
  • 34
  • 119
  • 193