public void Initialize()
 {
     if (null == engine)
     {
         engine = SafeNativeMethods.ENGINE_by_id(Name);
         if (engine.IsInvalid)
         {
             throw new InvalidOperationException($"Unable to load engine '{Name}'");
         }
         var result = SafeNativeMethods.ENGINE_init(engine);
         if (0 == result)
         {
             SafeNativeMethods.ENGINE_free(engine);
             throw new InvalidOperationException($"Unable to load engine '{Name}'. ENGINE_init returned {result}");
         }
     }
 }
Example #2
0
 internal static extern void ENGINE_free(DynamicEngineHandle engine);
Example #3
0
 internal static extern int ENGINE_set_default(DynamicEngineHandle engine, EngineDefaults defaults);
Example #4
0
 internal static extern void ENGINE_register_complete(DynamicEngineHandle engine);
Example #5
0
 internal static extern int ENGINE_finish(DynamicEngineHandle engine);
Example #6
0
 internal static extern IntPtr ENGINE_get_id(DynamicEngineHandle engine);
Example #7
0
 internal static extern int ENGINE_get_flags(DynamicEngineHandle engine);