Форум: "Основная";
Текущий архив: 2002.04.04;
Скачать: [xml.tar.bz2];
ВнизКак узнать какая программа загрузила мою DLL? Найти похожие ветки
← →
Digitman (2002-03-20 09:38) [8]Points to a procedure invoked by a DLL entry point.
Unit
System
Category
miscellaneous routines
var DLLProc: Pointer;
Description
DLLProc is used to specify a procedure that is invoked every time a DLL"s entry point is called. A procedure assigned to DLLProc must take one parameter of type Integer. For example,
procedure LibraryProc(Reason: Integer);
When the procedure is invoked, this single parameter contains a value between 0 and 3 as defined by the following group of constants in the Windows unit.
const
DLL_PROCESS_DETACH = 0;
DLL_PROCESS_ATTACH = 1;
DLL_THREAD_ATTACH = 2;
DLL_THREAD_DETACH = 3;
For further details on the meaning of these constants, refer to the description of the DllEntryPoint function in the Win32 API online help.
Note: DLL_PROCESS_ATTACH is passed to the procedure only if the DLL’s initialization code calls the procedure and specifies DLL_PROCESS_ATTACH as a parameter.
---------------------------------------------------------------
Резюме :
в теле DllProc (см.хэлп, как ее "перехватить") с параметром DLL_PROCESS_ATTACH или DLL_THREAD_ATTACH достаточно вызвать MainThreadId или GetCurrentThreadId, чтобы, получив Id процесса/потока, использовать этот Id для получения инф-ции о процессе/потоке, "подключившемся" к твоей DLL.
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.04.04;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.004 c