Quantcast
Channel: Adobe Community : Unanswered Discussions - Acrobat
Viewing all articles
Browse latest Browse all 73766

Acrobat Plugin Unloading

$
0
0

When closing Adobe Acrobat after using my plugin it throws an error.

 

I release all my objects ( I Think ) when the following method is called

 

ACCB1 ASBool ACCB2 PluginUnload ()

 

But still get the error.

 

The part which seems to be the problem is the following lines of code

 

 

  std::string str ("C:\\test.jpg");

                              asPathName = ASFileSysCreatePathName(NULL, ASAtomFromString("Cstring"), str.c_str(), 0);

                              if(ASFileSysOpenFile64(0, asPathName, ASFILE_READ, (ASFile *)&asFile) != 0)

                              {

      AVAlertNote("Could not read file...");

      bRet = false;

      return bRet;

                              }

 

 

                              *outNumASPathNames = 1;

                              *outASPathNames = (ASPathName*)&asPathName;

                              *ioChosenFilterIndex = -1;

                              *outFileSys = ASGetDefaultFileSys();

 

This is returning successfully and inserting a Document (test.jpg) into the current PDF.

 

Later on in my Cleanup code I release everything I can tell.

 

  ASFileSysReleasePath(0,asPathName);

          asFile = NULL;

 

From the Adobe SDK API it only says I need to release the ASPathName, Am I missing something here?

 

Cheers

Ben


Viewing all articles
Browse latest Browse all 73766

Trending Articles