2

需要在远程 PC 上启用什么才能远程使用 WUApiLib?我有这段代码返回错误 80070005

Type t = Type.GetTypeFromProgID("Microsoft.Update.Session", "192.168.1.14");
        UpdateSession uSession = (UpdateSession)Activator.CreateInstance(t);
        IUpdateSearcher uSearcher = uSession.CreateUpdateSearcher();
        uSearcher.Online = false;
        IUpdateHistoryEntryCollection history = uSearcher.QueryHistory(0, uSearcher.GetTotalHistoryCount());
        for (int i = 0; i < history.Count; ++i)
        {
            Console.WriteLine(history[i].Title);
        }
4

0 回答 0