mirror of
https://github.com/JDM170/model_coder
synced 2025-12-10 05:57:19 +07:00
38 lines
885 B
C++
38 lines
885 B
C++
#include "main.h"
|
|
#include "base64.h"
|
|
|
|
// a sample exported function
|
|
void DLL_EXPORT SomeFunction(const LPCSTR sometext)
|
|
{
|
|
MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION);
|
|
}
|
|
|
|
extern "C" DLL_EXPORT std::string Base64Encode(BYTE const* buf, unsigned int bufLen)
|
|
{
|
|
return base64encode(buf, bufLen);
|
|
}
|
|
|
|
extern "C" DLL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
{
|
|
switch (fdwReason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
// attach to process
|
|
// return FALSE to fail DLL load
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
// detach from process
|
|
break;
|
|
|
|
case DLL_THREAD_ATTACH:
|
|
// attach to thread
|
|
break;
|
|
|
|
case DLL_THREAD_DETACH:
|
|
// detach from thread
|
|
break;
|
|
}
|
|
return TRUE; // succesful
|
|
}
|