3 Replies Latest reply: Jun 28, 2011 3:12 AM by lrosenth RSS

    Need Help for DigSigCompareWords in DLL File

    DareenTourkey Community Member

      Hello :

       

      i had used DigSigCompareWords in c++ application using SDK 9 and generate DLL file to be used in Java native method

      while running java class it read the 1st print line then stopped asking for Debug!

      after Debug i got that gDigSigHFT returned null, can you please help me solve that issue?

       

      here 's the cpp file:

       

      try{
      printf("****CallAcrobatCommand******!\n");

      gDigSigHFT = ASExtensionMgrGetHFT(ASAtomFromString("DigSigHFT"), 1);

      printf("****gDigSigHFT******!\n");
      gAcroViewHFT = ASExtensionMgrGetHFT(ASAtomFromString("AcroViewHFT"), 1);
      gCoreHFT = ASExtensionMgrGetHFT(ASAtomFromString("CoreHFT"), 1);
      gAcroSupportHFT = ASExtensionMgrGetHFT(ASAtomFromString("AcroSupportHFT"), 1);
      gASExtraHFT= ASExtensionMgrGetHFT(ASAtomFromString("ASExtraHFT"), 1);

       

      AVDoc avDocA = AVAppGetActiveDoc();
      PDDoc docA = AVDocGetPDDoc (avDocA);
      AVDoc avDocB = AVAppGetActiveDoc();
      PDDoc docB = AVDocGetPDDoc (avDocB);
      char* myPath = "C:\\AcrobatCompare\\28321.pdf";

      char* myPath2 = "C:\\AcrobatCompare\\136rvi.pdf";

       

          //open first PDf
          ASAtom pathType = ASAtomFromString("Cstring");
          ASText titleText = ASTextNew();
          ASTextSetPDText(titleText, titls);
          ASFileSys fileSys = ASGetDefaultFileSysForPath(pathType, myPath);
          ASPathName pathName = ASFileSysCreatePathName(fileSys, pathType, myPath, NULL);
          avDocA = AVDocOpenFromFile(pathName,fileSys,NULL);   
          docA = AVDocGetPDDoc (avDocA);

       

          //open second PDF
          ASAtom pathType2 = ASAtomFromString("Cstring");
          ASText titleText2 = ASTextNew();
          ASTextSetPDText(titleText2, titls2);
          ASFileSys fileSys2 = ASGetDefaultFileSysForPath(pathType2, myPath2);
          ASPathName pathName2 = ASFileSysCreatePathName(fileSys2, pathType2, myPath2, NULL);
          avDocB= AVDocOpenFromFile(pathName2,fileSys2,NULL);
          docB =AVDocGetPDDoc (avDocB);
         printf("****begin compare******!\n");

         ASBool myBool =DigSigCompareWords(docA,docB,false);
            printf("****done******!\n");
         }
         catch (...){
         printf("***Error******!\n");
          throw;
         }