psapi

Why does changing the order of including psapi.h gives compilation erros?(Indentifier BOOL is undefined)

久未见 提交于 2021-02-11 12:47:15
问题 I am using Visual Studio Community 2017 to code c++. When I run the following code everything works fine. #include "pch.h" #include<Windows.h> #include<Psapi.h> #include <iostream> #include <conio.h> int main() { std::cout << "Really!! How do you do it?"; _getch(); } But if I change the order of #include s by including psapi.h before Windows.h , compiler goes badass and throws 198 errors at me, which surprisingly(maybe only to me) includes Identifier "BOOL" is undefined . Why is this

Why does changing the order of including psapi.h gives compilation erros?(Indentifier BOOL is undefined)

折月煮酒 提交于 2021-02-11 12:47:14
问题 I am using Visual Studio Community 2017 to code c++. When I run the following code everything works fine. #include "pch.h" #include<Windows.h> #include<Psapi.h> #include <iostream> #include <conio.h> int main() { std::cout << "Really!! How do you do it?"; _getch(); } But if I change the order of #include s by including psapi.h before Windows.h , compiler goes badass and throws 198 errors at me, which surprisingly(maybe only to me) includes Identifier "BOOL" is undefined . Why is this

GetModuleInformation Fails on Linkage in Windows 10

旧街凉风 提交于 2021-01-29 06:39:21
问题 I am trying to create a DLL Injector that will directly execute functions within the DLL in the target process. I am trying to get the entry point of the DLL I injected so I can get the offset of the function. I read on the Microsoft Docs to use GetModuleInfo() . I used the header psapi.h and found that compilation worked, but it failed on linkage providing the following error: g++ dll_injector.cpp -o dll_injector.exe C:\Users\DELKAR~1\AppData\Local\Temp\ccOeKdhW.o:dll_injector.cpp:(.text

Java JNA - Base Address Finding

不问归期 提交于 2021-01-28 10:59:06
问题 I am currently attempting to read/write to memory through the use of JNA for Java. For the past week I have tried a multitude of solutions, mostly from similar projects I have found online, but nothing has resolved my problem. I know I am receiving the correct process ID of the program, then I create a Pointer using the openProcess method. Then I call getBaseAddress using the newly created Pointer. The problem I believe lies within the EnumProcessModules/Psapi method/class. Truthfully I am

How to get Windows window names with ctypes in python

﹥>﹥吖頭↗ 提交于 2019-11-30 10:27:26
I try to get Windows window title names and pids through handles with long objects. My code works but there is something wrong with it. I get only 4 window titles when I should get 10 or more. Can anyone help and tell me how to fix this code? I think the problem is with how I convert long objects (I don't understand them too well, as well as ctypes in general). from __future__ import print_function from ctypes import * psapi = windll.psapi titles = [] # get window title from pid def gwtfp(): max_array = c_ulong * 4096 pProcessIds = max_array() pBytesReturned = c_ulong() psapi.EnumProcesses

How to get Windows window names with ctypes in python

烈酒焚心 提交于 2019-11-29 16:13:30
问题 I try to get Windows window title names and pids through handles with long objects. My code works but there is something wrong with it. I get only 4 window titles when I should get 10 or more. Can anyone help and tell me how to fix this code? I think the problem is with how I convert long objects (I don't understand them too well, as well as ctypes in general). from __future__ import print_function from ctypes import * psapi = windll.psapi titles = [] # get window title from pid def gwtfp():