GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Chainload example · techiew/UltimateProxyDLL@164580d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • dllmain.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎dllmain.cpp‎

Copy file name to clipboardExpand all lines: dllmain.cpp
+26-4Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,43 @@
33

44
#include "UniversalProxyDLL.h"
55

6+
DWORD WINAPI NewThread(LPVOID lpParam)
7+
{
8+
std::ifstream chainloadFile;
9+
chainloadFile.open("upd_chainload.txt");
10+
if (chainloadFile.is_open())
11+
{
12+
std::string line;
13+
while (getline(chainloadFile, line))
14+
{
15+
line.erase(line.find_last_not_of(' ') + 1);
16+
line.erase(0, line.find_first_not_of(' '));
17+
UPD::Log("Loading: ", line);
18+
LoadLibraryA(line.c_str());
19+
}
20+
chainloadFile.close();
21+
return 1;
22+
}
23+
UPD::Log("upd_chainload.txt not found.");
24+
return 0;
25+
}
26+
627
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
728
{
829
if (fdwReason == DLL_PROCESS_ATTACH)
930
{
1031
DisableThreadLibraryCalls(hinstDLL);
1132
try
12-
{
13-
UPD::OpenDebugTerminal();
33+
{
34+
UPD::MuteLogging();
1435
UPD::CreateProxy(hinstDLL);
36+
CreateThread(0, 0, &NewThread, NULL, 0, NULL);
1537
}
1638
catch (std::runtime_error e)
1739
{
1840
std::cout << e.what() << std::endl;
1941
return FALSE;
2042
}
2143
}
22-
return TRUE;
23-
}
44+
return TRUE;
45+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.