我想存储没有目录的可执行文件名(即system.exe)。
我该怎么做?
HANDLE Handle = OpenProcess(PROCESS_ALL_ACCESS, 0, ProcessID);
if (GetModuleFileNameEx(Handle, 0, (LPWSTR)exename, sizeof(exename) - 1))
{
ProcessName = (wchar*)exename; // I want to store only the executable name without "C:\\..."
}