Questions tagged [mixed-mode]

A mixed-mode application is any application that combines native code (C++) with managed code (such as Visual Basic, Visual C#, or C++/CLI that runs on the common language runtime).

From MSDN:

A mixed-mode application is any application that combines native code (C++) with managed code (such as Visual Basic, Visual C#, or C++/CLI that runs on the common language runtime).

Mixed assemblies are capable of containing both unmanaged machine instructions and MSIL instructions. This allows them to call and be called by .NET components, while retaining compatibility with components that are entirely unmanaged. Using mixed assemblies, developers can author applications using a mixture of managed and unmanaged functionality.

249 questions
0
votes
1 answer

Exporting method with unmanaged type in signature in mixed mode assembly

I have a mixed mode assembly, built with the /clr option. I am trying to export a class from it, for consumption by another mixed mode assembly, also built with the /clr option. My problem is that the signature of the method contains a mixture of…
Cumbayah
  • 4,415
  • 1
  • 25
  • 32
0
votes
0 answers

Jvm mixed mode and JavaFx error

I try to launch my javafx(gluon crosplatform) application on orange pi Armbian operation system. Use zero,zulu,oracle jdk(try all). Use embeded javafx from gluon. Use -Dmonocle.platform = X11 Dprism.order = es2 I have very strange problem. The…
0
votes
0 answers

Debugging native C++ code, called from managed C# library, executed by another app

I have the following setup: Third-party app (Autodesk Revit) executes my C# library thru C# Revit API (the library is Revit addon, named csapi). Then, my C# library calls another C++ native library (libbrowserhost-client-capid.dll) thru PInvoke. My…
Andy Coarse
  • 25
  • 1
  • 6
0
votes
1 answer

Why the assembly loader is not checkin the GAC for a C++/CLI mixed mode assembly?

I have a C# project that references a C++/CLI mixed mode assembly. That assembly is stored inside a folder into the PATH and it is also present at the GAC but when it is executed I get a: System.IO.FileNotFoundException: Could not load file or…
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
0
votes
2 answers

How find which dll is causing: "Mixed mode assembly built against version ... cannot be loaded in 4.0 runtime"?

There are many questions about "Mixed mode assembly is built against version .. of the runtime and cannot be loaded in the 4.0 runtime", E.g. Mixed mode assembly is built against version 'v1.1.4322' but I don't see any discussion of how to find out…
ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196
0
votes
1 answer

Why is MSVS 2008 VC++ project giving error: relational operator failure in the quickwatch window when I compare two System::String objects

I am trying to debug a DLL that I have built with MSVS 2008 in VC++. I selected to use the CLR (Common Language Runtime?) so I can take advantage of the System::Net::Socket API. That API seems to be working fine but, one of my functions in the DLL…
Travis
  • 552
  • 1
  • 8
  • 14
0
votes
1 answer

Unload mixed mode assembly

I have native windows application developed mainly in C++. I would like to put some C# / UI components on top of that application. But main application is rather heavy to start up and debug, I would like for C# to be polite to application and it…
TarmoPikaro
  • 4,723
  • 2
  • 50
  • 62
0
votes
0 answers

Interacting with native DLLs in C++/CLI: Is there a workaround for heap corruptions?

I need to interact with a native third-party library I don't have the source code of. I get a heap corruption from just a simple thing like this: void MyInterop::DoNastyStuff(String^ foo) { ThirdParty::NativeThing x =…
rabejens
  • 7,594
  • 11
  • 56
  • 104
0
votes
0 answers

Problems using C++ REST with Windows Form and mixed managed code in VS2015

I'm attempting to use the C++ REST SDK. I'm using this example as my starting point. What has worked so far is creating a new Windows CLR application in VS2015, adding a new cpp file, installing cpprestsdk thru NuGet, pasting the tutorial code into…
Apneal
  • 483
  • 4
  • 6
0
votes
2 answers

Can't use/debug unmanaged DLL from C#

I have a C# application and a C++ DLL, both x86. The Application is the startup project, the DLL project is inside the same solution and is referenced as a project. The C++ DLL outputs its PDB file with the same name as the DLL inside the Debug…
Axonn
  • 10,076
  • 6
  • 31
  • 43
0
votes
1 answer

C#/C(managed2unamanged)Visual studio 2015 update 2 , .NetCore Console App 1.0 , not able to debug Native Code Debugging

I am using a .Net Core Console App using Visual Studio 2015 update 2 on windows machine. I am using a package "pack1"(managed code) in this console application which in turn calls native / c code dll. I am able to step into pack1 code, but i am not…
0
votes
1 answer

StringToCoTaskMemUni or StringToCoTaskMemAnsi methods can cause hang?

I have the below code in c++/CLI and observing hang while converting the .net string to char * using StringToCoTaskMemAnsi const char* CDICashInStringStore::CDIGetStringVal( void ) { unsigned int identifier = (unsigned int)_id; debug("…
Sadhu
  • 57
  • 7
0
votes
2 answers

Pass C# array of object to C++/CLI

I'm force to expose some methods in a C# library so that they can be used from an external program written in C++ (VC++ 6.0). I thus created a mixed assembly which works quite ok so far but I have some troubles with a method that returns an array of…
CitizenInsane
  • 4,755
  • 1
  • 25
  • 56
0
votes
1 answer

c++/cli: delegate to managed method taking native argument

I would like to have a way to make a call to a method of a reference class which takes a native argument. Creating a delegate seems the most obvious choice but it doesn't work with such methods. Please have a look at following snippet #pragma…
0
votes
1 answer

Retrieve native function address from mixed mode dll with IDA or Olly

this my first question here, so please dont be too hard on me:) What I got: a mixed mode C# dll, that has C# code which in turn calls a native method in the same dll, that im interested in The calling: int num3 =…