Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How do you handle exceptions between .NET and COM?
Managed Code and Unmanaged Code related ASP.NET - How do you handle exceptions between .NET and COM?
✍: Guest
.NET handles errors through exception classes. COM handles errors through 32-bit data types called HRESULTs. All of the .NET exception classes include HResult properties that map to COM HRESULT codes.
If an exception occurs in a .NET object, the exception is automatically mapped to the appropriate HRESULT and returned to COM. Similarly, if an exception occurs in a COM object, the COM HRESULT is mapped to the appropriate exception class, which is returned to .NET, where it can be handled just like any other exception.
If you are creating your own .NET exception classes for use with COM, be sure to set the class’s HResult property so that the exception can be handled within COM.
2009-04-14, 4385👍, 0💬
Popular Posts:
How To Check the Oracle TNS Settings? - Oracle DBA FAQ - ODBC Drivers, DSN Configuration and ASP Con...
What are the different elements in Functions points? The different elements in function points are a...
How To Download and install PSP Evaluation? - PSP Tutorials - Fading Images to Background Colors wit...
How To Add Column Headers to a Table? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells I...
How do I debug thread ? This window is only seen when the program is running in debug mode. In windo...