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
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.
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));
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.