One of our customers is getting an error:
Delphiexception class : EdxGdipException
exception message : Invalid operation in GDI+ (Code: 7).
main thread ($1d2c):
0062525d +015 HireTrackNX.exe dxGDIPlusAPI 1474 +2 GdipCheck
0063103e +066 HireTrackNX.exe dxGDIPlusClasses 4255 +4 CreateStream
006310da +01e HireTrackNX.exe dxGDIPlusClasses 4279 +3
TdxGPImage.InternalSaveToStream
00630192 +002 HireTrackNX.exe dxGDIPlusClasses 3697 +0
TdxGPImage.SaveToStreamByCodec
00630187 +013 HireTrackNX.exe dxGDIPlusClasses 3692 +1
TdxGPImage.SaveToStream
006314f0 +00c HireTrackNX.exe dxGDIPlusClasses 4483 +1
TdxSmartImage.WriteData
Now "Code 7 " is Win32Error, but surely there must be a way of working out what is causing the Win32Error. Should not GdpiCheck() be calling GetLastError in order to work out what the underlying problem is?
Paul
Hello Paul,
This call stack trace is insufficient for us to find the cause of the problem. At first glance, I see two possible causes of this error:
2. A certain codec (most likely PNG) is disabled in your system, so the GDI+ library cannot display PNGs.
Anyway, would you please provide us with a small sample project so we can precisely replicate this scenario on our side?
Paulo,
The error occurs when once of our users runs ANY of our reports (Report Builder by Digital Metaphors). These reports run correctly on other PCs, so its likely to be a problem with the Windows setup. Which is why I thought GdpiCheck() should be calling GetLastError so that we have something better to go on than "Invalid operation in GDI+ (Code: 7)."
Perhaps, you are right. I will discuss the usage of GetLastError there with our developers.
Am I right in my assumption that you wish to have the "Win32Error" message instead of the Invalid operation in GDI+ (Code: 7) exception?
I think so, yes. The current GdpiCheck() effectively masks what the underlying cause it.
OK. Thanks. We will think this over.