Skip to content

Cant work #3

@Airboi

Description

@Airboi

Hi

I fix the issues and tried in 32bit and 64bit office at Windows10 Environment

But I found result = NtQueryInformationProcess(newProcessHandle, 0, pbi, Len(pbi), size) doesn't work. the result is FALSE

And the new Process still be a childProcess of WINWORD.EXE.
Can you help me

By the way, the function to getPid is not work.
I used WMI to get Pid

Function getProcessId(ByVal name As String)
    Dim objServices As Object, objProcessSet As Object, Process As Object
    Dim tmp As Integer
    Set objServices = GetObject("winmgmts:\\.\root\CIMV2")
    Set objProcessSet = objServices.ExecQuery("SELECT ProcessID, name FROM Win32_Process WHERE name = " & Chr(&H22) & name & Chr(&H22), , 48)
    For Each Process In objProcessSet
        tmp = Process.ProcessID
    Next
    getProcessId = tmp
End Function

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions