2
#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
DWORD getbaseadress(DWORD Pid, TCHAR* n);
using namespace std;
int main(int argc, char* argv[])
{
HWND hwnd = 0;
DWORD pid = 0;
hwnd = FindWindow(0,"PXG Cliente"); // erro aqui
if (hwnd)
{
GetWindowThreadProcessId(hwnd, &pid);
if (pid)
{
HANDLE ghandle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION, pid);
if (ghandle)
{
DWORD baseadress = getbaseadress(pid, "pxgcliente.exe");// ERRO AQUI
You’re making the following mistake:
argument of type char is incompatible with lpcwstr
How to solve?
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero