C++で下記のようなエラーが出て困っております
起動中のプロセス選択機能を実装中に以下のエラーメッセージが発生しました。
起動しているプロセスを取得してエミュレータのNoxを取得してPIDを選択させたいです、後はiniファイルを読み込ませたいのですがm(__)m
重大度レベル コード 説明 プロジェクト ファイル 行 抑制状態 エラー (アクティブ) 型 "const char *" の引数は型 "LPCWSTR" のパラメーターと互換性がありません ConsoleApplication40 c:\Users\裕司\Documents\Visual Studio 2015\Projects\ConsoleApplication40\ConsoleApplication40\ConsoleApplication40.cpp 86 ###該当のソースコード #include "stdafx.h" #include <Shlwapi.h> #include <iostream> #include <tlhelp32.h> #include <iomanip> // for std::setw, std::setfill> #define hexformat(fill, wd) std::hex << std::setfill(fill) << std::setw(wd) using namespace std; typedef LONG(WINAPI *TNtReadVirtualMemory)(HANDLE, PVOID, PVOID, ULONG, PULONG);**__###ボールドテキスト__** typedef LONG(WINAPI *TNtWriteVirtualMemory)(HANDLE, PVOID, PVOID, ULONG, PULONG); TNtReadVirtualMemory pfnNtReadVirtualMemory = nullptr; TNtWriteVirtualMemory pfnNtWriteVirtualMemory = nullptr; const UINT SEARCH_STA_ADDR = 0x00000000; // サーチ開始アドレス const UINT SEARCH_END_ADDR = 0x7FFFFFFF; // サーチ終了アドレス const int SEARCH_TARGET = 0x15; // 戦闘中か否か[0x15:非戦闘中、not 0x15:戦闘中] const int BUFFER_SIZE = 0x8000; const int WAIT_TIME = 10; HANDLE pHandle; // iniファイル関連 const char INI_FILE[] = "./wanpan.ini"; int sleep_time_ini = 4000; int battle_wait_time_ini = 5000; int auto_battle_ini = 0; int result_cancel_ini = 0; UINT search(unsigned char bytecode[], int n, bool checkhex) { // サーチ開始アドレス UINT start = SEARCH_STA_ADDR; int a = 0; CHAR *MemoryBuff = new CHAR[BUFFER_SIZE]; while (start <= SEARCH_END_ADDR) { pfnNtReadVirtualMemory(pHandle, (LPVOID)start, (LPVOID)MemoryBuff, BUFFER_SIZE, nullptr); for (int i = 0; i < BUFFER_SIZE; i += 4) { // バッファのサイズ=ループ回数 start += 4; MemoryBuff += 4; if (memcmp(MemoryBuff, bytecode, n) == 0) { if (checkhex == true) { //addr = start - 0x208; // Ver 5.2.0-5.2.1 //addr = start - 0x224; // Ver 5.3.0 pfnNtReadVirtualMemory(pHandle, (LPVOID)(start - 0x230), &a, 4, nullptr); if (a == 0xFFFFFFFF) { return start; } } else { return start; } } } MemoryBuff -= BUFFER_SIZE; //ポインタを戻しておきます。 } delete[] MemoryBuff; return 0; } DWORD SearchProcesses() { HANDLE hSnap; PROCESSENTRY32 pe; DWORD dwProcessIdLast[4]; BOOL bResult; int i, no; try { if ((hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)) == INVALID_HANDLE_VALUE) { throw "CreateToolhelp32Snapshot"; } i = 0; pe.dwSize = sizeof(pe); bResult = Process32First(hSnap, &pe); while (bResult) { if (!lstrcmpi(pe.szExeFile, "NoxVMHandle.exe")) { if (i == 0) { cout << "\n" << "PID List" << "\n"; } dwProcessIdLast[i] = pe.th32ProcessID; i++; cout << i << ":" << std::hex << dwProcessIdLast[i - 1] << endl; } bResult = Process32Next(hSnap, &pe); } while (true) { cout << "モンストを起動後、PIDの番号を入力してください。" << "\n"; cin >> no; if (cin.good() == 0) { cout << "整数値以外のPIDが入力された。" << "\n"; cin.clear(); cin.seekg(0); continue; } else { if (no < 1 || no > i) { cout << "正しいPIDの番号を入力してください。" << "\n"; cin.clear(); cin.seekg(0); continue; } break; } } } catch (char* str) { cout << "error:" << str << "\n"; } return dwProcessIdLast[no - 1]; } void Init() { // iniファイルより各々の設定情報を取得する sleep_time_ini = GetPrivateProfileInt("Option", "SleepTime", 4000, INI_FILE); //cout << "sleep_time = " << sleep_time_ini << endl; battle_wait_time_ini = GetPrivateProfileInt("Option", "BattleWaitTime", 5000, INI_FILE); //cout << "battle_wait_time = " << battle_wait_time_ini << endl; auto_battle_ini = GetPrivateProfileInt("Option", "AutoBattle", 1, INI_FILE); //cout << "AutoBattle = " << auto_battle_ini << endl; result_cancel_ini = GetPrivateProfileInt("Option", "ResultCancel", 0, INI_FILE); //cout << "ResultCancel = " << result_cancel_ini << endl; } int main() {

下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。