I have a legacy C++ application using /clr calling a managed dll (written in C#)
The app uses #import to reference ADOX. The dll also references ADOX.
Everything is fine until I add a reference to my dll to the C++ project. Then I get hundreds of errors when compiling STDAFX.CPP related to msadox.tli and msadox.tlh. Some of the errors refer to interface redefinition and suchlike, others to trying to compile the tlh and tli as if they were managed code.
I've tried #pragma managed(off) around the #import without success.
In case it's relevant the #import uses the libid:... method.
I don't understand how this conflict occurs and what I can do to overcome it. Please help!