MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / _getfunc

Function _getfunc

core/src/utils/window.cc:56–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55template <typename T>
56static T _getfunc(const char *lib, const char *fn)
57{
58 static T proc = nullptr;
59 if (!proc)
60 {
61 auto mod = LoadLibraryA(lib);
62 if (mod) proc = reinterpret_cast<T>(GetProcAddress(mod, fn));
63 }
64 return proc;
65}
66
67#define getfunc(lib, fn) _getfunc<fn>(lib, #fn)
68

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected