Hi,
I have a C++ app written using C++ Builder 6. I have a .NET (C-sharp) application that is called from the C++ app using COM. Everything works until I change the parameters of the .NET method. This is what I do:
- Unregister the .DLL and .TLB files using regasm /u
- Change the .NET code. Only the method call changes, i.e. I added a parameter, e.g. public void Method(int x) becomes public void Method(int x, int y)
- In .NET increase the version number of the COM project.
- Rebuild the .NET code.
- Copy the .DLL and .TLB files to the Builder C++ source code folder.
- Run regasm on the .DLL and .TLB files.
- Open the Builder project.
- Remove the old TLB wrapper files (.h and .cpp) from the Builder project.
- Delete the old TLB wrapper files (.h and .cpp) from the folder.
- Import type libraries in builder. I can see that the version number has changed.
- Make all projects.
- I see the TLB wrapper being built.
- The compiler moves to the next file and hangs.
Observations:
- If I comment the #include for the type library wrapper the compile works. Simply including the wrapper .h file causes the compile to hang.
- If I do not change the .NET method interface and only change the code inside the .NET method, I can rebuild the builder project.
- If a create a new builder project and then import the new type library the project builds.
Questions:
How can I get Builder to rebuild the project when the interface of a method called via COM changes ?
Has anybody had a similiar problem ?
Kind regards
Robert Hartleb
I have a C++ app written using C++ Builder 6. I have a .NET (C-sharp) application that is called from the C++ app using COM. Everything works until I change the parameters of the .NET method. This is what I do:
- Unregister the .DLL and .TLB files using regasm /u
- Change the .NET code. Only the method call changes, i.e. I added a parameter, e.g. public void Method(int x) becomes public void Method(int x, int y)
- In .NET increase the version number of the COM project.
- Rebuild the .NET code.
- Copy the .DLL and .TLB files to the Builder C++ source code folder.
- Run regasm on the .DLL and .TLB files.
- Open the Builder project.
- Remove the old TLB wrapper files (.h and .cpp) from the Builder project.
- Delete the old TLB wrapper files (.h and .cpp) from the folder.
- Import type libraries in builder. I can see that the version number has changed.
- Make all projects.
- I see the TLB wrapper being built.
- The compiler moves to the next file and hangs.
Observations:
- If I comment the #include for the type library wrapper the compile works. Simply including the wrapper .h file causes the compile to hang.
- If I do not change the .NET method interface and only change the code inside the .NET method, I can rebuild the builder project.
- If a create a new builder project and then import the new type library the project builds.
Questions:
How can I get Builder to rebuild the project when the interface of a method called via COM changes ?
Has anybody had a similiar problem ?
Kind regards
Robert Hartleb