Esempio n. 1
0
        protected void UninstallAtom(AtomID atomID)
        {
            TaskLogger.LogEnter();
            base.WriteVerbose(Strings.LogExsetdataUninstallingAtom(atomID.ToString()));
            uint scErr = ExsetdataNativeMethods.SetupAtom((uint)atomID, 61954U, ConfigurationContext.Setup.InstallPath, ConfigurationContext.Setup.InstallPath, this.DomainController, this.Organization, this.LegacyOrganization, AdministrativeGroup.DefaultName, AdministrativeGroup.DefaultName, AdministrativeGroup.DefaultName, RoutingGroup.DefaultName, ManageExsetdataAtom.LoggerDelegate);

            this.HandleExsetdataReturnCode(scErr);
            TaskLogger.LogExit();
        }
Esempio n. 2
0
        private static uint GetMessageFromExsetdata(uint scErr, CultureInfo cultureInfo, ref string errorMessage)
        {
            StringBuilder stringBuilder = new StringBuilder(500);
            int           capacity      = stringBuilder.Capacity;
            int           lcid          = cultureInfo.LCID;
            uint          num           = ExsetdataNativeMethods.ScGetFormattedError(scErr, lcid, stringBuilder, ref capacity);

            if (num == 3221684458U)
            {
                stringBuilder.EnsureCapacity(capacity);
                capacity = stringBuilder.Capacity;
                num      = ExsetdataNativeMethods.ScGetFormattedError(scErr, lcid, stringBuilder, ref capacity);
            }
            if (num == 0U)
            {
                errorMessage = stringBuilder.ToString();
            }
            return(num);
        }