Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
动态重排区块
template<> struct std::default_delete<XPackageInstallationMonitorHandle> { typedef XPackageInstallationMonitorHandle pointer; void operator()(XPackageInstallationMonitorHandle handle) const noexcept { XPackageCloseInstallationMonitorHandle(handle); } }; HRESULT PrioritizeChunk(uint32_t chunkId, XPackageInstallationMonitorHandle* monitor) { char id[PACKAGE_IDENTIFIER_MAX_LENGTH]; *monitor = nullptr; RETURN_IF_FAILED(XPackageGetCurrentProcessPackageIdentifier(_countof(id), id)); XPackageChunkSelector selector; selector.type = XPackageChunkSelectorType::Chunk; selector.chunk = chunkId; XPackageInstallationMonitorHandle temp; RETURN_IF_FAILED(XPackageCreateInstallationMonitor(id, 1, &selector, 1000, queue, &temp)); std::unique_ptr<XPackageInstallationMonitorHandle> localMonitor(temp); XPackageInstallationProgress progress; XPackageGetInstallationProgress(localMonitor.get(), &progress); if (!progress.completed) { RETURN_IF_FAILED(XPackageChangeChunkInstallOrder(id, 1, &selector)); *monitor = localMonitor.release(); } return S_OK; }
相关主题
此页面对您有帮助吗?