Is it possible to get DllMain as thread mount / disconnect notifications in standalone exe without using any additional dlls?
Edit: This is just a theoretical question related to some testing that I am doing. not a real life situation.
There is no external code that runs in the thread and downloads the executable file, so there are no notifications about thread attachment / detachment [1]. The code in the executable usually controls streaming [2].
If you describe your scenario, people can give you some ideas on how to achieve it.
[1] , . , .[2] , , . COM/RPC.
. Win32 - , , , DLL, API, , /.
, DLL, , API (WaitForDebugEvent() ). "" ( , ), , exe CreateProcess() DEBUG_ONLY_THIS_PROCESS, ( "" ) WaitForDebugEvent() , . ( ) , , .
WaitForDebugEvent()
CreateProcess()
DEBUG_ONLY_THIS_PROCESS
, DLL , , .
Your question is to receive a notification while the process is loading and unloading. This is more applicable to DLLs as they are loaded by other processes.
For Exes, you have InitInstance and ExitInstance, which you can handle the same!
Source: https://habr.com/ru/post/1698078/More articles:What open source .Net projects or code libraries do you use? - .netПрограмма поиска и замены регулярных выражений - regexEasy IIS installation for php - phpКак лучше всего получить поддержку и обратную связь для нового проекта с открытым исходным кодом? - open-sourceBest Timer Approach in a C # Batch Application - c #Anyone using Microsoft ASML? - .netSending a mouse click on a button in silverlight 2 - eventshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1698081/does-a-user-need-admin-rights-to-install-flash-player&usg=ALkJrhhu3Hku3xR0SLE1JnfhRgJZOg06-wVB6 Date Data Type: Accuracy and Formatting - typesIs there a better way to display an object than using a hierarchy? - c #All Articles