WPCubed Product Support

Attempting to write a bitmap to a memory stream fails in 64 bit

The two references to Commandin my code were CommandStrEx but otherwise the same. When I changed the code to what was suggested the problem went away.

#3 ♥ 0
3.1k Views 2 users read 1 min
wpsupport

Please check if in WriteBitmap this code is used:

res := Command(COMPDF_MakeBitmap, '', {$IFDEF WIN64} IntPtr{$ELSE} Cardinal {$ENDIF}(@t));

...

Command(COMPDF_MakeGetMEMORY, '', {$IFDEF WIN64} IntPtr{$ELSE} Cardinal {$ENDIF}(Memory.Memory));

#2 ♥ 0

When I use the command PdfViewer.WriteBitmap(i, wpBMP_RGB, '', MemStream, 100); compiled in a 64 bit app there is an access violation raised from the WPViewPDF3 unit. This access violation does not occur if the same app is compiled and ran as a 32 bit app. PDFViewer is a TWPViewPDF and MemStream is aTMemoryStream. This has been tried on version 4.8.5 and 4.8.3.

#1 ♥ 0