You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const char* exePath = argv[1];
if (ConvertToGUI(exePath)) {
std::cout << exePath << " has been converted to a Windows GUI application." << std::endl;
return 0;
}
else {
std::cerr << "Failed to convert " << exePath << " to a Windows GUI application." << std::endl;
return 1;
}
}
The text was updated successfully, but these errors were encountered:
#include
#include <windows.h>
bool ConvertToGUI(const char* exePath) {
HANDLE hFile = CreateFileA(exePath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) {
std::cerr << "Failed to open file: " << GetLastError() << std::endl;
return false;
}
}
int main(int argc, char* argv[]) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <path_to_exe>" << std::endl;
return 1;
}
}
The text was updated successfully, but these errors were encountered: