Add support for callback when loading images and display loaded images in wslc image load#40960
Open
OneBlue wants to merge 9 commits into
Open
Add support for callback when loading images and display loaded images in wslc image load#40960OneBlue wants to merge 9 commits into
OneBlue wants to merge 9 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the internal WSLC COM surface to support an IImageLoadCallback that reports each image reference discovered during LoadImage, and wires that through the wslc image load CLI so it prints “Loaded image …” lines as images are restored.
Changes:
- Adds
EnumReferenceFormat+IImageLoadCallbacktowslc.idland extendsIWSLCSession::LoadImageto accept the callback. - Implements callback detection/parsing in
WSLCSession::ImportImageImpland prints loaded-image lines in the CLIimage loadtask. - Updates unit/e2e tests and helper plumbing to validate callback behavior and CLI output.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/windows/WSLCTests.cpp | Updates LoadImage calls for new signature; adds tests validating the callback reports loaded images. |
| test/windows/wslc/e2e/WSLCE2EImageSaveTests.cpp | Validates wslc image load prints loaded-image lines when restoring multiple images. |
| test/windows/wslc/e2e/WSLCE2EHelpers.h | Declares HelloWorldTestImage() helper. |
| test/windows/wslc/e2e/WSLCE2EHelpers.cpp | Implements HelloWorldTestImage() helper. |
| test/windows/Common.cpp | Updates helper LoadTestImage() to pass the new (optional) callback param. |
| src/windows/wslcsession/WSLCSession.h | Extends LoadImage method signature to accept IImageLoadCallback*. |
| src/windows/wslcsession/WSLCSession.cpp | Passes callback through to ImportImageImpl; parses “Loaded image …” stream output and invokes callback. |
| src/windows/wslc/tasks/ImageTasks.cpp | Adds CLI callback implementation that prints localized “Loaded image …” lines during image load. |
| src/windows/wslc/services/ImageService.h | Extends ImageService::Load to accept an optional callback. |
| src/windows/wslc/services/ImageService.cpp | Passes optional callback through to COM LoadImage. |
| src/windows/service/inc/wslc.idl | Adds EnumReferenceFormat + IImageLoadCallback; extends IWSLCSession::LoadImage signature. |
| src/windows/common/wslutil.h | Removes the local EnumReferenceFormat enum class (now sourced from IDL-generated headers). |
| src/windows/common/wslutil.cpp | Updates parsing to use the IDL enum constants (EnumReferenceFormatTag, etc.). |
| msipackage/package.wix.in | Registers proxy/stub for the new IImageLoadCallback interface. |
| localization/strings/en-US/Resources.resw | Adds localized CLI strings for “Loaded image …” and “Loaded image ID …”. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This change adds API support for callbacks when loaded images and displays loaded images in wslc
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed