[resolved] external symbol '_GdipCreateEffect (x86 only)

Windows specific forum
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

[resolved] external symbol '_GdipCreateEffect (x86 only)

Post by Denis »

PB 5.40 b8 x86

I get this when using Gdiplus function GdipCreateEffect() only under x86 plateform, under 64 bit it's ok.
Polink error : unresolved external symbol '_GdipCreateEffect'
I changed PB original Gdiplus.lib file with last version from MS SDK (246 Ko instead of 240 Ko) but still the problem (compiler restarted).

I don't know if other effect functions can be runnig under x86 PB plateform.

Code: Select all

GdipDeleteEffect()
GdipGetEffectParameters()
GdipGetEffectParameterSize()
GdipSetEffectParameters()
GdipBitmapApplyEffect()
GdipBitmapCreateApplyEffect()
Last edited by Denis on Thu Oct 08, 2015 5:37 am, edited 1 time in total.
A+
Denis
Fred
Administrator
Administrator
Posts: 18226
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: unresolved external symbol '_GdipCreateEffect (x86 only)

Post by Fred »

According to this: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx, this function isn't declared with WINGDIPAPI macro, so I don't think you can import it.
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: unresolved external symbol '_GdipCreateEffect (x86 only)

Post by Denis »

Hi fred,

you're right.

instead of GpStatus WINGDIPAPI GdipBitmapGetHistogramSize( ...

it's like that

Status __stdcall GdipCreateEffect(const GUID guid, CGpEffect **effect)


from h file
class CGpEffect;

extern "C" {
Status __stdcall
GdipCreateEffect(const GUID guid, CGpEffect **effect);

Status __stdcall
GdipDeleteEffect(CGpEffect *effect);

Status __stdcall
GdipGetEffectParameterSize(CGpEffect *effect, UINT *size);

Status __stdcall
GdipSetEffectParameters(CGpEffect *effect, const VOID *params, const UINT size);

Status __stdcall
GdipGetEffectParameters(CGpEffect *effect, UINT *size, VOID *params);
}
it is chance if it works in 64 bits ? the problem only lies in 32 bit.
I will use directly gdiplus.dll in 32 bits. i'll keep import in 64 bit mode.
A+
Denis
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: unresolved external symbol '_GdipCreateEffect (x86 only)

Post by Denis »

Fred,

how to say that in english ... j'en perd mon latin

WINGDIPAPI is declared
#define WINGDIPAPI __stdcall

GpStatus is declared
typedef Status GpStatus;

is GpStatus WINGDIPAPI = to Status __stdcall ?
i'm not a C guru :mrgreen:
A+
Denis
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: unresolved external symbol '_GdipCreateEffect (x86 only)

Post by Denis »

Fred,
finally i found the trouble.

x86 import with GdipCreateEffect() function needs 5 parameters in contrast to 64 bit version that only needs 2 parameters

Code: Select all

GdipCreateEffect(a.i, b.i, c.i, d.i, e.i) As "_GdipCreateEffect@20"
I saw that with ts-soft Lib2PBImport tool (tks for that tools ts-soft :wink: ).

Now, GdipCreateEffect() returns correct value.
Last edited by Denis on Thu Oct 08, 2015 7:18 am, edited 1 time in total.
A+
Denis
Fred
Administrator
Administrator
Posts: 18226
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [resolved] external symbol '_GdipCreateEffect (x86 only)

Post by Fred »

I see, it's probably because of the GUID structure is which is sent by copy.
Post Reply