I have a project in which I practice using DLLs. I need to somehow display the lpReserved value from the dllmain.cpp file to the console. Here is the code for the dllmain.cpp file:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
I tried to output this value directly in this file via cout or printf, but there was nothing. Later I set a breakpoint and discovered that the program did not even enter this file when executed.