Link to home
Start Free TrialLog in
Avatar of ZifNab
ZifNab

asked on

simple C++ to Delphi

Hi,

At least I think this are simple translations, I only don't know enough of C++ to be sure. Can you help me translate the following? Thanks:

/* XLATOFF */
#ifdef  IS_32
#define DBTFAR
#else
#define DBTFAR  far
#endif
/* XLATON */

#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
#define _WCHAR_T_DEFINED
#endif

#ifndef GUID_DEFINED
    #define GUID_DEFINED
    typedef struct _GUID {
        ULONG   Data1;
        unsigned short Data2;
        unsigned short Data3;
        unsigned char Data4[8];
    } GUID;
#endif // !defined(GUID_DEFINED)

what is winversion 0x040A in Delphi? (does it exist?=WIN32?)

#if(WINVER >= 0x040A)
blablabla
#endif /* WINVER >= 0x040A */

What is UNICODE in Delphi?

#ifdef UNICODE
typedef DEV_BROADCAST_PORT_W     DEV_BROADCAST_PORT;
typedef PDEV_BROADCAST_PORT_W    PDEV_BROADCAST_PORT;
#else
typedef DEV_BROADCAST_PORT_A     DEV_BROADCAST_PORT;
typedef PDEV_BROADCAST_PORT_A    PDEV_BROADCAST_PORT;
#endif

Avatar of philipleighs
philipleighs

You may not need to translate this:
WideChar is already defined in Delphi 3, 4
Also, there is a GUID structure (and associated routines) in Delphi called TGuid.

This is a joke, right?
(If it isn't, I apologize)

/// John
At first I thought "why would this be a joke?" That is until I saw who posted it...
... not that zif is funny looking or anything. I mean that you (zif) are *the* EE expert.
My point exactly!
Avatar of ZifNab

ASKER

hehe, gringrin, groble, groble, gniffel,gniffel.cof,cof. Had a nice day? :-P? Nice to hear from you all again.
ASKER CERTIFIED SOLUTION
Avatar of Lischke
Lischke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ZifNab

ASKER

Liscke, thanks for the info, but I already knew this... but because of the work you've put in answering this q'n, you'll get the points.

But, now, let's just use this thread for talking about,.... you name it...

Zif.
Well, I'm wondering why you then asked the question? Is it just to make a thread up and running? Anyway, I don't mind answering even "dummy" questions :-) as long as it takes not too long and is promising a bit fun...

Read you again,

Ciao, Mike
Hi, Zif, do you mean "translate" or "explain"? By "translate", one shoould mean getting those C++ code into Delphi code, right?

^_^