This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
int main() | |
{ | |
/* | |
* OPEN THIS BEFORE ROBLOX | |
* DO NOT CLOSE THIS OTHERWISE IT WILL CLOSE ALL ROBLOX PROCESSES EXCEPT ONE | |
*/ | |
CreateMutexA(NULL, TRUE, "ROBLOX_singletonMutex"); | |
while (true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This only cover the extraction of a resource from the current exe | |
// Checkout https://stackoverflow.com/a/62391707/11723029 | |
#include <Windows.h> | |
void extract() { | |
HRSRC hResource = FindResource(NULL, MAKEINTRESOURCE(IDB_EMBEDEXE), TEXT("BINARY")); | |
HGLOBAL hGlobal = LoadResource(NULL, hResource); | |
size_t exeSiz = SizeofResource(NULL, hResource); // Size of the embedded data | |
void* exeBuf = LockResource(hGlobal); | |
DWORD at; |