When I mix managed with unmanaged code I get the compiler error: "'IDataObject' : ambiguous symbol". How do I resolve this? Thanks.

Re: 'IDataObject' : ambiguous symbol error 80 80

And the rest of the error is? Post your entire compiler output when you build the application.

Re: 'IDataObject' : ambiguous symbol error 80 80

1) error C2872: 'IDataObject' : ambiguous symbol
2) fatal error C1903; unable to recover from previous error(s); stopping compilation
3) warning C4935: assembly access specifier modified from 'public
4) warning C4935: assembly access specifier modified from 'public

File - C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ObjIdl.h for all 4 errors

typedef /* [unique] */ IDataObject *LPDATAOBJECT; -- selected code for Error1

IDataObject : public IUnknown -- selected code for Error2

typedef interface IDataObject IDataObject; -- selected code for Error3

typedef interface IMessageFilter IMessageFilter; -- selected code for Error4

Re: 'IDataObject' : ambiguous symbol error 80 80

The error has been resolved.

Move all 'using namespace XXXX' from .h to .cpp

Re: 'IDataObject' : ambiguous symbol error 80 80

Thank you for taking the time to post the resolution to your problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.