COM issues

J

jehugaleahsa

Hello:

I have some code that works on top of COM. One is a library provided
by Crystal Reports (Business Objects) and that other is for GroupWise
(Novell).

In the first case, I keep getting errors about COM objects being
disconnected from their context. Essentially, whenever I run the
Crystral Report code in a test project, the test will succeed, but
after the test method ends a COM error shows up. From what I have been
reading, it seems to be related to a different thread trying to access
the COM object. However, unless the Test code is in a different
thread, my code is single-threaded. Any clue about what could cause
the COM object to be "disconnected"?

The second case relates to a COM object that requires the project type
to be a Windows Form application. I tried to write a library to access
the GroupWise application. However, I can only have the GroupWise code
inside a Windows Form application (not a library) or I will get even
more weird errors. Is there a way to force COM objects to work in
different project types than they were intended?

Finally, I have been noticing that the debugger in VS8 has some
interesting features. For one, if you have a loop that loops
indefinitely, in some cases it will raise a message about a potential
deadlock. Other times, if there is a lot of memory usage, another
message will display saying there is a memory leak (which is
incorrect). While these would be useful messages, in general they are
just annoying since they stop my debugger midway. Is there a way to
disable these "warnings"?

Thanks,
Travis
 
M

Michael Rubinstein

Travis, I have seen similar COM errors - a COM object gets disconnected
when the first GUI thread is terminated. In my case the first GUI thread was
a splash screen shown while the application loads. On some machines the COM
object crashed when the splash screen terminated. I had to remove the splash
screen.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top