freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] calling conventions


From: Soeren Muehlbauer
Subject: [Devel] calling conventions
Date: Sun, 15 Feb 2004 19:17:08 +0100

Hi,

i have built the library as a dll. All seems to be ok. But now i want
to change the calling convention, which is currently cdecl to stdcall.
I edited the lines in ftOption.h.

They now look like this:

#define  FT_EXPORT(x)    extern __declspec(dllexport)  x __stdcall
#define  FT_EXPORT_DEF(x) __declspec(dllexport)  x  __stdcall

It compiles ok. But some calls, for instance FTC_SBitCache_New result
in a GPF. I figured out that there is a struct for each cache. There
are pointers to methods in these struct. The declaration for example
is like the following:

typedef FT_Error
  (*FTC_Cache_InitFunc)( FTC_Cache  cache );

This means implicitly that the default(compiler) calling convention is used.
But the implementation of the function is like this:

FT_EXPORT_DEF( FT_Error )
  ftc_cache_init( FTC_Cache  cache )

As you can see, the calling conventions arent equal. What can i do to
get the stdcall calling convention? Thanks in advance.
  
-- 
Best regards,
Soeren Muehlbauer
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]