Access Violation on Application Close

  • Hi

    This problem cause only on registered version!!! (It was ok on DEMO)

    It is the only code:

    Code
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      if OpenDialog1.Execute then
        if OpenDialog1.FileName<>'' then WPViewPDF1.filename:=OpenDialog1.FileName;
    end;

    http://www.zuzlan.name/pdf-error.zip - test exe + wPDFView03.dll

    Program work fine until i'm trying close my app.

    Should i do some uninitialize or something?
    (D7, win XP)

  • I have fix it by myself:

    Code
    procedure TForm1.FormCreate(Sender: TObject);begin  WPViewPDFDLLHandle:=0;end;

    Queerly, because it present on initializing section of WPViewPDF3.pas

    Code
    initialization
    
    
    WPViewPDFDLLHandle := 0;