Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Visual Studio solution has around 10 projects. Each project has different target and some projects use output of other projects. Most of the projects are ActiveX components represented by DLLs. Each project has its own set of interfaces. I want to define new interfaces in ProjectB but want to keep the interface name same ( but different CLSID) as the one used in ProjectA. The project A uses output of ProjectB. When I build the solution, I get compilation errors indicating re-definition. How this isssue can be resolved? Is it practical or not? I think it is quite practical because an application may use components from diffrent vendors and each vendor develops component without bothering about keeping the unique names but ensuring unique id. But how to resolve compilation issues ?
Posted
Updated 23-Dec-10 2:03am
v2

1 solution

If the interfaces are defined in speparate namespaces it shouldn't matter. You have to make sure though that when one class uses both interfaces they would have to be fully qualified.

I hope I expressed it clearly.

Modification: After all namespaces were especially made for resolving naming conflicts.End of modification

Cheers,

Manfred
 
Share this answer
 
v4
Comments
Rajesh G Manwani from Mumbai 23-Dec-10 8:49am    
Do .idl files have namespaces ?
johannesnestler 23-Dec-10 8:52am    
yep, just fully qualify - but Manfred was (again) faster with his answer. @ Manfred - thumbs up!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900