Creating MSHTML::TxtRange Object Causes Function to Exit w/o Excep

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello,

Has anybody encountered an interop situation where calling a COM function
will cause your C# function to simply exit without throwing any exception,
and without executing any code beyond where you called the COM function?

I am trying to create a TxtRange object on a Selection Object like thus:

SelObj = m_Document.selection;
TxtRange = (IHTMLTxtRange)SelObj.createRange();

And when it hits the line where it should create the TxtRange, it simply
stops executing code inside my function and exits the function without
throwing any exception!

Can anyone shed any light on this behavior for me?

Thanks a lot,
Rich
.



Relevant Pages

  • Re: return command
    ... > exception. ... > finally in case you "exit" cannot depend on whether there's an exception, ... I tried substituting halt for exit, and it halts without executing the ... consistent thing to do would be to allow the goto, ...
    (borland.public.delphi.non-technical)
  • Re: Structured Exception Handling (was: Try Finally...)
    ... >statements will be traversed outwards exactly once, executing each ... What really bite me is the re-raise of the exception ... and the continuation in statementList2. ... This means that during unwinding the code immediately returns, ...
    (comp.lang.pascal.delphi.misc)
  • Re: Terminating Access Applications
    ... frmTest is OPEN and you exit the application by calling any of these three exit ... Executing a routine that closes all open forms prior to calling any of the ... all Form member variables are still available in both Form_Unload ... I also added error handling to catch an issue ...
    (microsoft.public.access.formscoding)
  • Re: Why finally?
    ... I get the same results from executing the code as well. ... This seems to be a definite improvement of V1.x of the framework. ... normal exception paths. ... // Inject an asynchronous ThreadAbortException in the target thread, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DirectShow Insanity
    ... The exception happens immediately upon executing the ... > and what exactly is shown in the debug output window? ... > what happens if you wait for completion befor exiting the program? ...
    (microsoft.public.win32.programmer.directx.audio)