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 a TMemoryStream. This has been tried on version 4.8.5 and 4.8.3.
Attempting to write a bitmap to a memory stream fails in 64 bit
-
-
- Offizieller Beitrag
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));
-
The two references to Command in my code were CommandStrEx but otherwise the same. When I changed the code to what was suggested the problem went away.