❔ wpf app crashing when trying to run managed c++ code inside a dll
so, in visual studio i have two projects
the first is a WPF (c#) app
the second is a c++ dynamic library configured to support .net framework (/clr)
as far as i know both are compiling to .net framework 7
my wpf app runs fine until it calls any code from the dll, in which case it crashes without any errors.
both are configured on debug and x64
11 Replies
It’s hard to debug or even have a right direction to start looking without any error messages
ye
Stack Overflow
C# app crashes when using C++/CLR dll
I have 3 applications one is a native C++ application which outputs a static library, one is a C++/CLR wrapper for this static library and finally a C# windows forms application that uses the C++/CLR
The last answer seems interesting
Give it a look?
if it helps, it always exits with code 0x80000003
both are x64
im gonna try to create mre
Stack Overflow
How to find error in 'The program .. has exited with code -21474836...
I have an uwp project testing on Win 10 iot core with raspberry pi 3. I do remote debugging on device. After a while the application crashes and only i can see in debug is that error.'The program ....
This one specifically
nope
it's just a simple dll
with a class and an empty constructor
bruh
i found the error
removing DllMain fixed it
for some reason
oh
i need to put #pragma unmanaged above DllMain
that makes sense
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.