Hi,

I trying to write a DLL from a Visual C specification and (not really knowing C
much at all) I need a little help with some of the conversion:

1) I presume I can convert all the straighforward #Defines into consts?

2) Can I convert the macro defines into functions? eg what would:
     #define AlphaByte(x)   (((x))>>ALPHA_SHIFT)
    map to?

3) there is one particular conditional define that I am not sure about at all:
     #ifndef DLLEXPORT
     #define DLLEXPORT    __declspec( dllexport )
     #endif
    then at the end of the header file there is:
     DLLEXPORT VisInfo* QueryModule(void);    /* exported DLL */
   I understand that DLLEXPORT will be replaced with __declspec( dllexport ),
but it's the only place so why bother defining it? And what does it do? and can
I achieve the same thing in Delphi?

4) Can I ignore the #pragmas? There is only one (used in a couple of places):
#pragma pack (push, 8) and #pragma pack (pop, 8)

5) When compiling are there any special flags etc that I should use to ensure
it's as compatible as possible with a Visual C compiler's output?

Thanks for any help,

Phil Middlemiss.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to