Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

ambiguous data types

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
--== Alain ==-- - 14 Oct 2006 17:11 GMT
Hi,

Under VC++.net, if i include windows.h, and compile my application, i
have several data types ambiguous, like IDataObject, IMessageFilter,
IDropTarget,...

so it means that they are defined in windows.h but also in some other
namespaces.

how can i do to still have my windows.h included and avoiding ambiguous
definition ? and thus without undefining all ambiguous data type ?

thx.

Alain
Carl Daniel [VC++ MVP] - 14 Oct 2006 17:17 GMT
> Hi,
>
[quoted text clipped - 8 lines]
> ambiguous definition ? and thus without undefining all ambiguous data
> type ?

You're going to have to show some minimal amount of code to reproduce the
problem that you're seeing.

Generally, I think the experience is better if you do NOT include windows.h
in modules that are compiled with /clr - keep it limited to purely native
modules.

-cd
--== Alain ==-- - 14 Oct 2006 17:26 GMT
Here is the ARDLLWrapper.h file that i include in my main.h file
When i compile this file with its relative *.cpp, it's ok, but when i
try to compile my application. It generates the error i meant before.
it seems that it is known problem, but i did not find the solution on
internet for now.

do you have an idea ?

//--- ARDLLWrapper.h --
#include <windows.h>
using namespace System;
using namespace System::Runtime::InteropServices;
//---------------------------------------------------------------------------
#ifndef CARDLLWrapperH
#define CARDLLWrapperH
//------------------------------------------------------------------------------
public ref class CARDLLWrapper
{
 private:
 public:
 CARDLLWrapper();
 ~CARDLLWrapper();
   
 [DllImportAttribute(L"frmwrk_lc.dll",
CallingConvention=CallingConvention::ThisCall,
CharSet = CharSet::Auto,
EntryPoint = L"DLL_GetString")]

 static LPTSTR DLL_GetString(HMODULE hwnd_DLL, long Index);

 bool InitLocalization(LPTSTR dll_name);

 LPTSTR STR(long Index);
};

//---------------------------------------------------------------------------
#endif

>> Hi,
>>
[quoted text clipped - 17 lines]
>
> -cd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.