Skip to content

Instantly share code, notes, and snippets.

@plowsec
Created May 26, 2020 12:06
Show Gist options
  • Select an option

  • Save plowsec/e0acacac0289d0604142e8422a2c9ce4 to your computer and use it in GitHub Desktop.

Select an option

Save plowsec/e0acacac0289d0604142e8422a2c9ce4 to your computer and use it in GitHub Desktop.
Quick and dirty dll main
void main_dll(){
toto();
}
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
if (reason != DLL_PROCESS_ATTACH)
return TRUE;
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)main_dll, NULL, 0, NULL);
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment