#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 are giving the following error:
argument of type char is incompatible with lpcwstr
How to solve?