Visual Studio 2005 Problem

C

Chuck Cobb

I have a Visio application that has been running solidly for several years
under Visual Studio 2003 - I'm just upgrading it to Visual Studio 2005 and I
get the following error:

System.Runtime.InteropServices.COMException (0x80010001): Call was rejected
by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))

This error occurs on a very simple piece of code where the application is
trying to read the path of a Visio document from a reference to the
document.

This problem didn't occur with VS.Net 2003...has anyone seen this problem?

Thanks,

Chuck Cobb
 
C

Chuck Cobb

Here's some more information on this problem...

The application does a lot of work with Visio prior to the time this error
occurs and just after this error occurs, I get a second error that says:

"Loader Lock was Detected - Attempting managed execution inside OS Loader
lock. Do not attempt to run managed code inside a DllMain or image
initialization function since doing so can cause the application to hang."

I believe that this error is the real root cause of the problem I'm
having...this seems to be causing the interface between .Net and Visio to
hang. I will do some more research into this problem. I've never seen this
problem before with VS.Net 2003.

Chuck
 
A

Al Edlund

Loader lock has been discussed here before. I found this

"I've just encountered the same problem and have discovered the error can be
prevented by disabling the LoaderLock exception from the
Debug>Exceptions>Managed Debugging Assistants menu. I also found it
necessary
to add GC.Collect() GC.WaitForPendingFinalizers() twice before closing my
app
to prevent it hanging in the IDE."

and this

http://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspx

al
 
C

Chuck Cobb

Thanks for the help...I will look into this more over the weekend and let
you know how it works out. The loader lock problem may or may not be
related to the other problem I was having.

Chuck
 
C

Chuck Cobb

Well, I solved the Loader Lock problem over the weekend and I still have the
original problem so it wasn't caused by the loader lock:

System.Runtime.InteropServices.COMException (0x80010001): Call was rejected
by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))

There seems to be something different about how VSNet 2005 handles COM
interfaces. Has anyone seen this problem?

Thanks,

Chuck
 
C

Chuck Cobb

I've done some more research on this and found that the problem only happens
when I'm running the application through VS2005.Net in debugging mode. It
doesn't happen when the application is normally installed and running -
somehow VS2005.Net is interfering with the COM interface to Visio.

Chuck
 
A

Al Edlund

I've seen (what appears to me as) a lot of issues when moving from vs2003 to
vs2005. vs2005 is much more strict at what it allows or won't allow. Thus
you end up seeing a lot of errors that were forgiven/not even seen in the
previous versions. I end up writing a lot of Try/Catch sessions for anything
that leaves the native code (especially com calls).
There is a known bug in making modules 'com visible'.
al
 

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