Page 1 of 1
[resolved] external symbol '_GdipCreateEffect (x86 only)
Posted: Wed Oct 07, 2015 6:26 am
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()
Re: unresolved external symbol '_GdipCreateEffect (x86 only)
Posted: Wed Oct 07, 2015 9:09 am
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.
Re: unresolved external symbol '_GdipCreateEffect (x86 only)
Posted: Wed Oct 07, 2015 10:27 am
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.
Re: unresolved external symbol '_GdipCreateEffect (x86 only)
Posted: Wed Oct 07, 2015 1:12 pm
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

Re: unresolved external symbol '_GdipCreateEffect (x86 only)
Posted: Thu Oct 08, 2015 5:36 am
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

).
Now, GdipCreateEffect() returns correct value.
Re: [resolved] external symbol '_GdipCreateEffect (x86 only)
Posted: Thu Oct 08, 2015 5:54 am
by Fred
I see, it's probably because of the GUID structure is which is sent by copy.