protected void Initialize(string libraryPath)
 {
     try
     {
         _end       = Loader.LoadFunction <J2K_StopTranslation>("J2K_StopTranslation");
         _translate = Loader.LoadFunction <J2K_TranslateMMNTW>("J2K_TranslateMMNTW");
         _init      = Loader.LoadFunction <J2K_InitializeEx>("J2K_InitializeEx");
     }
     catch (Exception e)
     {
         throw new Exception($"Could not load functions from ezTrans library '{libraryPath}'.", e);
     }
 }
示例#2
0
 private EztransXp(IntPtr eztransDll)
 {
     J2kMmntw = GetFuncAddress <J2K_TranslateMMNTW>(eztransDll, "J2K_TranslateMMNTW");
     J2kFree  = GetFuncAddress <J2K_FreeMem>(eztransDll, "J2K_FreeMem");
 }