end2end.space
Recent Pastes
Login
Register
C++ Cool paste!
Language:
Cpp |
Created:
3 weeks ago |
By:
HUTAOSHUSBAND
A
d
m
i
n
i
s
t
r
a
t
o
r
Options:
[Raw View]
Views: 25
#include "CustomStrings.h" #include <vector> #include "../resource.h" // Forward declaration of GetDataFromResource bool GetDataFromResource(LPCWSTR resourceName, LPCWSTR resourceType, std::vector<char>& data); CustomizableStrings g_customStrings = { L"A debugger has been found running in your system.", L"This binary cannot run under a virtual machine.", L"This Software is not permitted to run in a sandbox environment.", L"This program cannot run on your computer and will now exit.", L"An internet connection is required for verification.", L"This application is not authorized to run on this computer.", L"The Time Limit of this App has expired.", L"Invalid key or corrupted data.", L"The hardware ID of this machine does not match the required credentials. Please run this application on an authorized device.", L"Password Required", L"Please enter the password to continue:" }; void LoadCustomStrings() { std::vector<char> customStringsData; if (GetDataFromResource(MAKEINTRESOURCE(IDR_CUSTOM_STRINGS), L"CUSTOM_STRINGS", customStringsData) && customStringsData.size() == sizeof(CustomizableStrings)) { memcpy(&g_customStrings, customStringsData.data(), sizeof(CustomizableStrings)); } }