What is the delphi equivalent of the below code in C++? in worker code
#include <OverbyteIcsTypes.h> ... in OverbyteIcsTypes.h, #include <Windows.h> // should be inserted in the worker code so that it would recognize ::HWND #ifdef BCB #define HWND ::HWND #else ..<the current Delphi code here> #endif ... I think this is the cure for the problem. Regards, SZ ----- Original Message ----- From: "Fastream Technologies" <[EMAIL PROTECTED]> To: "ICS support mailing" <[email protected]> Sent: Tuesday, March 14, 2006 9:01 AM Subject: Re: [twsocket] BDS2006 & C++Personality = ERROR > Ok. So we had the BCB not see the definition of new HWND. How do we make > it > work with, HWND where it expects Window.HWND? Is there a #define thing > similar to C++? Even if this exists, since each delphi unit is a module, > we > would need to re-add the unit "windows" to "uses" of each unit that uses > HWND, right? > > Regards, > > SZ > > ----- Original Message ----- > From: "Francois PIETTE" <[EMAIL PROTECTED]> > To: "ICS support mailing" <[email protected]> > Sent: Monday, March 13, 2006 10:09 PM > Subject: Re: [twsocket] BDS2006 & C++Personality = ERROR > > >>> There is no notion of real "module" in C++. Namespaces are invented to >>> prevent name clashes for this purpose. You can have HWND and >>> Overbyteics:HWND at the same scope UNLESS you define, >>> >>> using namespace Overbyteics; >>> >>> which makes the "::" = "Overbyteics" and which is the case with >>> Overbyteics. >>> It is like adding a path to Delphi/BCB. There cannot be same named >>> components in the same project! What Francois should agree to do is to >>> rename all of the HWND's in the ICS code with Overbyteics::HWND (or >>> perhaps >>> rename the namespace name to ObICS for the sake of compacting), IMO. >> >> He think this is C++ code. It isn't. It is Delphi code. >> Instead, try conditionally compile the offending types redefinition in >> OverbyteIcsTypes.pas so that BCB doesn't see them. >> >> -- >> [EMAIL PROTECTED] >> http://www.overbyte.be >> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://www.elists.org/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
