|
by: Niall |
last post by:
I'm attempting to put a C# front end on my unmanaged C++ ray tracer code.
It's still in experimental stage, as I have never done anything with
exporting types from an unmanaged dll through to a managed C# dll before.
Currently, I have an unmanaged dll, a managed C++ wrapper dll and a C# dll.
I have managed to get enough exported from the unmanaged code to get a
vaguely correct picture on the screen, however there is some odd behaviour.
...
|
by: Bret Pehrson |
last post by:
Suppose the following:
// Unmanaged code
class UnmanagedException /* not visible outside of unmanaged code */
{
};
void DoSomething() /* visible (exported) to managed code */
{
throw new UnmangedException();
}
|
by: Mark Traudt |
last post by:
The following managed C++ function is called from an unmanaged C++ DLL:
double Divide( double num, double denom )
{
if( denom == 0.0 )
throw new std::exception( "divide by zero" );
return num / denom;
}
The caller calls the function within a C++ try-catch block, with the following two catch blocks:
|
by: Vasco Lohrenscheit |
last post by:
Hi,
I have a Problem with unmanaged exception. In the debug build it works
fine to catch unmanaged c++ exceptions from other dlls with
//managed code:
try
{
//the form loads unmanaged dlls out of which unmanaged exception //get
thrown
|
by: doug |
last post by:
I understand the basics of what managed code offers and that you open
yourself up to security issues if you allow unmanaged code. We already have
a decent amount of VB6 code to include COM DLLs. If we put wrappers around
some of our code or leave some "asis" what makes our existing production
code 'evil' just because it is now considered 'unmanaged'?
It may seem like a simple niave question, but the definitions for managed
and...
|
|
by: interX |
last post by:
Hi,
I have a little problem with managed/unmanaged in Visual Studio 2005
(Compiler setting /clr). I need to overhand several function pointers
from managed to unmanaged. These function pointers are stored in an
unmanaged struct and this struct is then overhanded by reference to the
unmanaged code (See code pieces below).
I thought the way to go is to create a delegate, pin it via
GCHandel::Alloc and use the function
|
by: hcaituiro |
last post by:
Can all unmanaged exceptions and others be caught in managed code? Or, you can do nothing to avoid your managed application to crash. Suppouse, you cannot modify the unmanaged code.
If you have the following piece of code in c#: (please, ignore syntax errors if is the case)
try {
call_to_unmanaged_code();
} catch (Exception e) {
do_something();
}
|
by: HeroOfSpielburg |
last post by:
Hello,
I'm new to the realm of .NET application creation, so please forgive
my ignorance.
I have been tasked with debugging a problem that arises with using a
DLL that contains managed and unmanaged code in concert with a managed
application that makes calls to the DLL. This problem has been
cropping up for a while, but the debugger provides very little
information (from what I can tell) as to what exactly is the problem.
|
by: caa |
last post by:
I have made a simple text example. I have two projects. First is an
unmanaged static lib, containing function F(), which created an object
of type A and throws an exception. The second project is a C++/ME
console application that calls F() and catches all exceptions with a
"catch(...)" filter. The thing that I dont understand is why doesn't
the auto object created on stack get destroyed. See my sources:
Project 1. Unmanaged lib....
|
by: akash |
last post by:
Hi,
I've got some C# code instantiating a managed C++ class which in turn
instantiates an unmanaged C++ class. I'm getting intermittent
exceptions caught by my C# code, but the I can't get any details of
the root cause. The info I have is:
System.Runtime.InteropServices.SEHException was unhandled by user code
ErrorCode=-2147467259
Message="External component has thrown an exception."
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|