FlexiCapture SDK to throw "A sharing violation occurred while accessing C:\Project1\Batch1\0002\preview.frdat"

Symptoms

FlexiCapture SDK shows the "A sharing violation occurred while accessing C:\Project1\Batch1\0002\preview.frdat" error during processing.

Cause

The error may be thrown after calling IDocuments::DeleteAll() method preceded by the usage of IPage::Image object.

Resolution

Create IImageDocument variable and use IImageDocument::Close() explicilty:

IDocument doc = docs.getElement( 0 );
doc.Open( true );
IPages pages = doc.getPages();
IPage page = pages.getElement( 0 );
IImageDocument imageDoc = page.getImage();
imageDoc.Close();
docs.DeleteAll();

 

 

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.