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
4
votes
3 answers

Core Data: Merging multiple Managed Object Contexts and deleting objects

I have an iPhone project where I have a series of Managed Objects in a Managed Object Context within the main application thread. On a separate thread, I import new objects from a webserver into a second Managed Object Context. If the import goes…
John
  • 10,837
  • 17
  • 78
  • 141
4
votes
1 answer

Is this .tlh file correct, and if not, then how do I generate the correct one?

I am trying to call a .NET 4.0 dll from unmanaged C++ code. I followed the instructions in this Code Project article by Atul Mani. I built the .NET dll, and followed all the steps up to and including registering it with regasm. Next, I created an…
user1725145
  • 3,993
  • 2
  • 37
  • 58
4
votes
3 answers

Remote debugging C# application in VS2010

I try to remote debug C# application (remote PC under WinXP (32bit), VS runs under Win7 (64bit) i got an error message: Error while trying to run project: Unable to start debugging. Logon failure: unknown user name or bad password. See help for more…
4
votes
1 answer

Obtaining COM objects from unmanaged code

I have a library that exports an unmanaged C routine that returns pointers to COM IUnknown-based objects. The DLL is not registered, and is not server. I would like to use the COM types from C#. I have already written C# interfaces for the COM…
Armentage
  • 12,065
  • 8
  • 33
  • 33
4
votes
4 answers

Managing destructors of managed (C#) and unmanaged (C++) objects

I have a managed object in a c# dll that maintains an anonymous integer handle to an unmanaged object in a c++ dll. Inside the c++ dll, the anonymous integer is used in an std::map to retrieve an unmanaged c++ object. Through this mechanism, I can…
user236520
4
votes
0 answers

DBus-Sharp not working on Windows

Well let me describe what I've done: Downloaded https://github.com/mono/dbus-sharp Added another project in xamarin studio (monodevelop) and named it "DBus-Sharp" Added the reference to my project to "DBus-Sharp" and tried to call Bus…
Sven
  • 447
  • 1
  • 6
  • 22
4
votes
1 answer

Best method of calling managed code(c#) from unmanaged C++

We have developed a s/w architecture consisting of set of objects developed in C#. They make extensive use of events to notify the client of changes in status, etc. The intention originally was to allow legacy code to use these managed objects…
DFP
  • 121
  • 2
  • 5
4
votes
1 answer

JSF dynamic template selection through manage bean

My use case is to provide facility to clients to select template dynamically. I am trying to select template using managed bean, as follows: testTemplate1.xhtml
Anees Haider
  • 239
  • 2
  • 10
4
votes
3 answers

Including a C++ header file in a c# file

I was converting a Managed c++ project to a C# one. The C++ project includes a constants C++ header file which is an external dependency present outside of the project. In the newly created C# file, is there a way to include this C++ header file? I…
Tyler Durden
  • 1,188
  • 2
  • 19
  • 35
4
votes
1 answer

Can I use managed C# DLL in unmanaged Delphi EXE?

Can I use managed C# DLL in unmanaged Delphi EXE? Or the only way is to have managed DLL and EXE or unmanaged DLL and EXE?
Darthman
  • 457
  • 4
  • 21
4
votes
1 answer

Unmanaged Exports (DllExport for .NET) and MSBuild error

I've installed Nuget package "Unmanaged Exports (dllExport for .NET). This works fine using MS Visual Studio 2010. Using MSBuild (Windows SDK v7.1) I get an error Index (zero based) must be greater than or equal to zero and less than the size of the…
Egbert
  • 41
  • 3
4
votes
2 answers

User32 API calls in .NET

I'm currently planning out a project involving creating a shell replacement for Windows (based on Blackbox, bblean specifically). However I wish to leverage the power of .NET to do so. Many of the API calls I'll need are housed within the User32…
Ryan Taylor
  • 121
  • 1
  • 6
4
votes
1 answer

Pass string from unmanaged code to managed

I have a problems with passing string from unmanaged code to managed. In my unmanaged class (unmanagedClass.cpp) I have a pointer to function from managed code: TESTCALLBACK_FUNCTION testCbFunc; TESTCALLBACK_FUNCTION takes one string and returns…
Alekstim
  • 452
  • 1
  • 8
  • 19
4
votes
3 answers

Set post build action for all projects in a solution

is there any way of setting and/or changing the post build event/action for all projects in an entire solution? I have some solutions with up to 50 projects in it which all need the same post build action except for 2 projects. When I have a new…
4
votes
2 answers

C++ vector with managed objects

Hello I need to have vector (or some other data structure, which is similar) filled with managed objects. Usually I can write: std::vector vect; But I cannot use: std::vector vect; Can somebody explain, how to change declaration…
ST3
  • 8,826
  • 3
  • 68
  • 92