>
> 1) I presume I can convert all the straighforward #Defines into consts?
yup.
>
> 2) Can I convert the macro defines into functions? eg what would:
> #define AlphaByte(x) (((x))>>ALPHA_SHIFT)
> map to?
function AlphaByte(x : byte) : byte;
begin
result := x shr ALPHA_SHIFT;
end;
note, in the C++ code, X can be a short, long, whatever....
> 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?
function QueryModule : PVisInfo;stdcall;
exports
QueryModule;
> 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)
Ouch - I think that forces stack push and pop's to align to 8 bytes. Not
sure tho. Depends if you are porting the code over, or just interfacing with
the DLL.
> 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?
Not really - if it doesn't work, there is not a lot you can do. If its
passing objects around, you are very definatly SOL.
Nic.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz