Skip to content
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

win32 Process Status API (PSAPI) bindings #4722

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Einh06
Copy link

@Einh06 Einh06 commented Jan 19, 2025

I added bindings for PSAPI on windows, since I used some of them on my personal project.

Comment on lines 60 to 64
Proctection: ULONG_PTR | 5,
ShareCount: ULONG_PTR | 3,
Shared :ULONG_PTR | 1,
Reserved :ULONG_PTR | 3,
VirtualPage: ULONG_PTR | 52,
Copy link
Member

@gingerBill gingerBill Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adhere to the Odin core style guidelines.

using DUMMYNAME: bit_field u64 {
	Proctection: ULONG_PTR | 5,
	ShareCount:  ULONG_PTR | 3,
	Shared:      ULONG_PTR | 1,
	Reserved:    ULONG_PTR | 3,
	VirtualPage: ULONG_PTR | 52,
}

Copy link
Author

@Einh06 Einh06 Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should now be resolved.

foreign psapi {
EnumProcesses :: proc(lpidProcess: PDWORD, cb: DWORD, lpcbNeeded: LPDWORD) -> BOOL ---
EnumProcessModules :: proc(hProcess :HANDLE , lphModule: ^HMODULE , cb: DWORD, lpcbNeeded: LPDWORD) -> BOOL ---
EnumProcessModulesEx :: proc(hProcess: HANDLE, lphModule: ^HMODULE ,cb: DWORD, lpcbNeeded: LPDWORD , dwFilterFlag: DWORD ) -> BOOL ---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adhere to the coding conventions. Have the : in the right place, no random spaces, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should now be resolved.

@Einh06 Einh06 requested a review from gingerBill January 21, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants