Click here to Skip to main content
15,894,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi I have a WPF application and a form app user control that have adobe pdf reader
I using windowshost to open pdf in wpf.
everything in opening and playing audio in pdf file is OK
closing wpf windows that contains pdfveiwer have no errors
but when application get closed this error appear
c++ runtime library error r6025 pure virtual function call

What I have tried:

C#
// Create the interop host control.
System.Windows.Forms.Integration.WindowsFormsHost host =
new System.Windows.Forms.Integration.WindowsFormsHost();
host.Child = pdfViewer1;
// Add the interop host control to the Grid
this.GridPdf.Children.Add(host);


//in Windows Closed Event
pdfViewer1.PdfFilePath = "";
pdfViewer1.Dispose();
this.GridPdf.Children.Remove(host);
Posted
Updated 27-Oct-20 22:01pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900