コード例 #1
0
        protected override void InternalProcessRecord()
        {
            MofCompiler           mofCompiler           = new MofCompiler();
            WbemCompileStatusInfo wbemCompileStatusInfo = default(WbemCompileStatusInfo);

            wbemCompileStatusInfo.InitializeStatusInfo();
            int num = mofCompiler.CompileFile(this.MofFilePath, null, null, null, null, 0, 0, 0, ref wbemCompileStatusInfo);

            if (num == 0)
            {
                TaskLogger.Log(Strings.ExchangeTracingProviderInstalledSuccess);
                return;
            }
            if (num == 262145)
            {
                TaskLogger.Log(Strings.ExchangeTracingProviderAlreadyExists);
                return;
            }
            base.WriteError(new ExchangeTracingProviderInstallException(wbemCompileStatusInfo.HResult), ErrorCategory.NotSpecified, wbemCompileStatusInfo);
        }
コード例 #2
0
ファイル: MofCompiler.cs プロジェクト: YHZX2013/exchange_diff
 public extern int CompileBuffer(int BuffSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] byte[] pBuffer, [MarshalAs(UnmanagedType.LPWStr)] string ServerAndNamespace, [MarshalAs(UnmanagedType.LPWStr)] string User, [MarshalAs(UnmanagedType.LPWStr)] string Authority, [MarshalAs(UnmanagedType.LPWStr)] string Password, int lOptionFlags, int lClassFlags, int lInstanceFlags, [In][Out] ref WbemCompileStatusInfo pInfo);
コード例 #3
0
ファイル: MofCompiler.cs プロジェクト: YHZX2013/exchange_diff
 public extern int CreateBMOF([MarshalAs(UnmanagedType.LPWStr)] string TextFileName, [MarshalAs(UnmanagedType.LPWStr)] string BMOFFileName, [MarshalAs(UnmanagedType.LPWStr)] string ServerAndNamespace, int lOptionFlags, int lClassFlags, int lInstanceFlags, [In][Out] ref WbemCompileStatusInfo pInfo);
コード例 #4
0
ファイル: MofCompiler.cs プロジェクト: YHZX2013/exchange_diff
 public extern int CompileFile([MarshalAs(UnmanagedType.LPWStr)] string FileName, [MarshalAs(UnmanagedType.LPWStr)] string ServerAndNamespace, [MarshalAs(UnmanagedType.LPWStr)] string User, [MarshalAs(UnmanagedType.LPWStr)] string Authority, [MarshalAs(UnmanagedType.LPWStr)] string Password, int lOptionFlags, int lClassFlags, int lInstanceFlags, [In][Out] ref WbemCompileStatusInfo pInfo);