Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
jlib
Commits
1f3da1b6
Commit
1f3da1b6
authored
2 weeks ago
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix process A/W
parent
d6419f5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
process.h
jlib/win32/process.h
+10
-10
No files found.
jlib/win32/process.h
View file @
1f3da1b6
...
...
@@ -183,7 +183,7 @@ inline std::vector<ProcessInfo::ModuleInfo> getProcessModules(DWORD dwPID, Error
std
::
vector
<
ProcessInfo
::
ModuleInfo
>
modules
=
{};
HANDLE
hModuleSnap
=
INVALID_HANDLE_VALUE
;
MODULEENTRY32
me32
;
MODULEENTRY32
W
me32
;
// Take a snapshot of all modules in the specified process.
hModuleSnap
=
CreateToolhelp32Snapshot
(
TH32CS_SNAPMODULE
,
dwPID
);
...
...
@@ -193,11 +193,11 @@ inline std::vector<ProcessInfo::ModuleInfo> getProcessModules(DWORD dwPID, Error
}
// Set the size of the structure before using it.
me32
.
dwSize
=
sizeof
(
MODULEENTRY
32
);
me32
.
dwSize
=
sizeof
(
me
32
);
// Retrieve information about the first module,
// and exit if unsuccessful
if
(
!
Module32First
(
hModuleSnap
,
&
me32
))
{
if
(
!
Module32First
W
(
hModuleSnap
,
&
me32
))
{
outputLastErrorHelper
((
L"Module32First"
),
output
);
// show cause of failure
CloseHandle
(
hModuleSnap
);
// clean the snapshot object
return
(
modules
);
...
...
@@ -207,8 +207,8 @@ inline std::vector<ProcessInfo::ModuleInfo> getProcessModules(DWORD dwPID, Error
// and display information about each module
do
{
ProcessInfo
::
ModuleInfo
info
;
info
.
name
=
me32
.
szModule
;
info
.
path
=
me32
.
szExePath
;
info
.
name
=
(
me32
.
szModule
)
;
info
.
path
=
(
me32
.
szExePath
)
;
info
.
pid
=
me32
.
th32ProcessID
;
info
.
base_address
=
(
DWORD
)
me32
.
modBaseAddr
;
info
.
base_size
=
me32
.
modBaseSize
;
...
...
@@ -338,7 +338,7 @@ inline ProcessInfos getProcessesInfo(ErrorOutputFunc output = dummyErrorOutputFu
HANDLE
hProcessSnap
;
HANDLE
hProcess
;
PROCESSENTRY32
pe32
;
PROCESSENTRY32
W
pe32
;
DWORD
dwPriorityClass
;
ProcessInfos
pinfos
=
{};
...
...
@@ -351,11 +351,11 @@ inline ProcessInfos getProcessesInfo(ErrorOutputFunc output = dummyErrorOutputFu
}
// Set the size of the structure before using it.
pe32
.
dwSize
=
sizeof
(
PROCESSENTRY
32
);
pe32
.
dwSize
=
sizeof
(
pe
32
);
// Retrieve information about the first process,
// and exit if unsuccessful
if
(
!
Process32First
(
hProcessSnap
,
&
pe32
))
{
if
(
!
Process32First
W
(
hProcessSnap
,
&
pe32
))
{
outputLastErrorHelper
((
L"Process32First"
),
output
);
// show cause of failure
CloseHandle
(
hProcessSnap
);
// clean the snapshot object
return
(
pinfos
);
...
...
@@ -364,10 +364,10 @@ inline ProcessInfos getProcessesInfo(ErrorOutputFunc output = dummyErrorOutputFu
// Now walk the snapshot of processes, and
// display information about each process in turn
do
{
if
(
filterset
.
find
(
pe32
.
szExeFile
)
!=
filterset
.
end
())
{
continue
;
}
if
(
filterset
.
find
(
(
pe32
.
szExeFile
)
)
!=
filterset
.
end
())
{
continue
;
}
ProcessInfo
pinfo
=
{};
pinfo
.
name
=
pe32
.
szExeFile
;
pinfo
.
name
=
(
pe32
.
szExeFile
)
;
// Retrieve the priority class.
dwPriorityClass
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment