Example #1
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);
        }
Example #2
0
        public static void SetCryptCallbackW(FsCryptCallbackW cryptProcW, int cryptNumber, int flags)
        {
            _callSignature = "SetCryptCallbackW";
            try {
                TcCallback.SetFsPluginCallbacks(null, null, null, null, null, null, null, cryptProcW);
                if (Plugin.Password == null)
                {
                    Plugin.Password = new FsPassword(Plugin, cryptNumber, flags);
                }

                TraceCall(TraceLevel.Warning, $"CryptoNumber={cryptNumber}, Flags={flags}, {cryptProcW.Method.MethodHandle.GetFunctionPointer().ToString("X")}");
            }
            catch (Exception ex) {
                ProcessException(ex);
            }
        }