Methods of C++ ATL COM dll not be called
-
Thursday, April 05, 2012 10:40 PMI have a native C++ COM dll that I created in order to replace a C# dll I been previously using. This was working and the methods were being called, but that changed a few days ago and for some reason when I make use of it the methods are no longer being called and I am trying to figure out why. However, when I make use of my old C# dll it still works.
Some background: This dll is being called my another dll that I do not have the source code for, so troubleshooting on that end is limited. I am able to attach to the process that makes use of the dll and I can see that both get loaded. When I attempt to make use of it on my own computer, using the same software that calls the dll, they work. I have had multiple versions of this dll around, so could there be some sort of conflict in the registry causing the class I have created not to be loaded correctly?
All Replies
-
Monday, April 09, 2012 12:10 PMModerator
Hello,
First, I would suggest you to use OLE-COM Object Viewer tool to check if your COM component is still registered.
Start->search it
http://msdn.microsoft.com/en-us/library/d0kh9f4c(v=vs.100).aspxSecond, you can get the error message from the CoCreateInstance function return value, and check the error code in this document.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686615(v=vs.85).aspx
Best regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
-
Monday, April 09, 2012 4:19 PMYou seem to be skipping a step. You need to build a test client that exercises the C# dll and tests all the method calls. Then try calling the new C++ COM dll instead. ensure that the test client doesn't need to be changed.
-
Tuesday, April 10, 2012 1:23 AMI am not exactly sure what happened but the next day I went in and make sure everything was unregistered, restarted the computer and it worked. I probably should have investigated as Jesse suggested as I imagine that would have helped track the actual problem down.

