Example #1
0
 public static void SetFsPluginCallbacks(ProgressCallback progress, ProgressCallbackW progressW, LogCallback log, LogCallbackW logW, RequestCallback request, RequestCallbackW requestW, FsCryptCallback crypt, FsCryptCallbackW cryptW)
 {
     if (progressCallback == null)
     {
         progressCallback = progress;
     }
     if (progressCallbackW == null)
     {
         progressCallbackW = progressW;
     }
     if (logCallback == null)
     {
         logCallback = log;
     }
     if (logCallbackW == null)
     {
         logCallbackW = logW;
     }
     if (requestCallback == null)
     {
         requestCallback = request;
     }
     if (requestCallbackW == null)
     {
         requestCallbackW = requestW;
     }
     if (fsCryptCallback == null)
     {
         fsCryptCallback = crypt;
     }
     if (fsCryptCallbackW == null)
     {
         fsCryptCallbackW = cryptW;
     }
 }
Example #2
0
        public static int InitW(int pluginNumber, ProgressCallbackW progressProcW, LogCallbackW logProcW, RequestCallbackW requestProcW)
        {
            try {
                _callSignature      = "FsInitW";
                Plugin.PluginNumber = pluginNumber;
                TcCallback.SetFsPluginCallbacks(null, progressProcW, null, logProcW, null, requestProcW, null, null);

                TraceCall(TraceLevel.Warning, $"PluginNumber={pluginNumber}, {progressProcW.Method.MethodHandle.GetFunctionPointer().ToString("X")}, {logProcW.Method.MethodHandle.GetFunctionPointer().ToString("X")}, {requestProcW.Method.MethodHandle.GetFunctionPointer().ToString("X")}");
            }
            catch (Exception ex) {
                ProcessException(ex);
            }

            return(0);
        }