At first I had the feeling the Microsoft had done a great job with COM interop. Run tlbimp and viola, slow but usable reuse of our "legacy" code. That was until the next time we recompiled the vb code, probably the next day.
For the next month or so I just attributed the problems to lack of understanding but now I am looking for help in understanding the issues. What seems to happen is that either we get errors when running tlbimp saying that various methods can't be found or after building, we will get query interface errors when using the interop dlls. In the first case, it is almost always problems where VB has automatically registered a typlib when it compiles. If the project is running in project compatibility, this situation is worse. The second situation comes up eveb when we compile in binary compatibility. In that case, even when VB sucessfully compiles without breaking compatibility, tlbimp is successful, but some methods when executed through the interop dll get query interface errors. Our best theory is that the interop dlls have disp ids in the metadata and that vb will reassign these at will, but sometimes even changes within a method seem to have this problem. I guess what I am hoping to find is a some best practices to follow when compiling VB com objects and then building the interop dlls including when to register and unregister dlls, compile, tips for tlbimp etc. that result in a reliable build process. We have an automated build process for everything but the vb build so once we figure it out, we can reproduce it easily. Thanks in advance. __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
