-
Notifications
You must be signed in to change notification settings - Fork 199
Replace WMI queries with direct API calls #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces WMI queries with direct Windows API calls for retrieving process information, specifically implementing process argument retrieval functionality. The change modernizes the codebase by using native Windows system calls instead of WMI queries, which typically provides better performance and reduces external dependencies.
Key changes:
- Added syscall wrappers for
ReadProcessMemoryandGetTickCount64Windows APIs - Implemented utility functions to read process memory structures and parse Unicode strings
- Replaced
ErrNotImplementedplaceholder with actual implementation inProcArgs.Get()
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sys/windows/zsyscall_windows.go | Added low-level syscall wrappers for ReadProcessMemory and GetTickCount64 Windows APIs |
| sys/windows/syscall_windows.go | Implemented helper functions for reading process memory structures, parsing Unicode strings, and processing command-line arguments |
| sigar_windows.go | Replaced stub implementation of ProcArgs.Get() with working code that retrieves process arguments using direct API calls |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
1d35da9 to
baea763
Compare
- normalize receiver naming Signed-off-by: Clay Kauzlaric <clay.kauzlaric@broadcom.com>
Signed-off-by: Clay Kauzlaric <clay.kauzlaric@broadcom.com>
baea763 to
61786ef
Compare
|
@aramprice I guess since you got this merged we can revert my change and increase windows-2022 to windows-latest again? See also #77 (comment) |
Based on #78