cobein
36p47 comments posted · 0 followers · following 0
86 weeks ago @ AdvanceVB - System Call Dispatcher · 0 replies · +1 points
86 weeks ago @ AdvanceVB - System Call Dispatcher · 1 reply · +1 points
86 weeks ago @ AdvanceVB - TLB and IDL · 0 replies · +1 points
87 weeks ago @ AdvanceVB - Comments · 0 replies · +1 points
88 weeks ago @ AdvanceVB - mZombieInvoke - Native... · 0 replies · +1 points
88 weeks ago @ AdvanceVB - SystemProcessesAndThre... · 0 replies · +1 points
Public Function RetrieveProcesses() As PROCESS()
Dim bvSPI(17) As Long 'As SYSTEM_PROCESS_INFORMATION
Dim bvTmp() As PROCESS
Dim bvBuffer() As Byte
Dim lPos As Long
Dim lSize As Long
'// Resize buffer to struct size + 4
ReDim bvBuffer(22)
'// Get buffer size
Call NtQuerySystemInformation(SystemProcessesAndThreadsInformation, bvBuffer(0), 22, lSize)
'// Make sure size id not 0
If lSize = 0 Then Exit Function
'// Resize buffer
ReDim bvBuffer(lSize)
'//Get procs info
Call NtQuerySystemInformation(SystemProcessesAndThreadsInformation, bvBuffer(0), lSize, lSize)
lPos = VarPtr(bvBuffer(0))
ReDim bvTmp(0)
Do
Call RtlMoveMemory(bvSPI(0), ByVal lPos, 18 * 4)
With bvTmp(UBound(bvTmp))
.lPID = bvSPI(17)
.sName = ReadUStr(bvSPI(15))
End With
lPos = lPos + bvSPI(0)
If bvSPI(0) = 0 Then Exit Do
ReDim Preserve bvTmp(UBound(bvTmp) + 1)
Loop
RetrieveProcesses = bvTmp
Erase bvBuffer
End Function
89 weeks ago @ AdvanceVB - SystemProcessesAndThre... · 1 reply · +1 points
Note: the buffer must be initialized to structure size + 4 if im not wrong I use 512 which is more than enough cause I dont have the actual structure with me right now.
cbBuffer = 512
ReDim bvBuffer(cbBuffer)
lRet = NtQuerySystemInformation(SystemProcessesAndThreadsInformation, bvBuffer(0), cbBuffer, lSize)
If lSize = 0 Then Exit Function
ReDim bvBuffer(lSize)
lRet = NtQuerySystemInformation(SystemProcessesAndThreadsInformation, bvBuffer(0), cbBuffer, lSize)
lPos = VarPtr(bvBuffer(0))
91 weeks ago @ AdvanceVB - Upgrading the blog (op... · 0 replies · +1 points
91 weeks ago @ AdvanceVB - Upgrading the blog (op... · 1 reply · +2 points
91 weeks ago @ AdvanceVB - Upgrading the blog (op... · 0 replies · +1 points
My idea was to "expand" the content range a lil bit and add some extra stuff to make it more organized and easy to use.
Well no matter what its still an idea and we will see what happen.
Contraption