DLLmain - missing procedure

Just starting out? Need help? Post your questions and find answers here.
Garfield
New User
New User
Posts: 9
Joined: Sun Dec 10, 2023 6:32 pm

DLLmain - missing procedure

Post by Garfield »

I noticed there is one procedure missing.

In help file:
For advanced programmers: there is 4 special procedures which are called automatically by the OS when one of the following events happen:

- DLL is attached to a new process
- DLL is detached from a process
- DLL is attached to a new thread
- DLL is detached from a thread

To handle that, it's possible to declare 4 special procedures called: AttachProcess(Instance), DetachProcess(Instance), AttachThread(Instance) and DetachThread(Instance). This means these 4 procedures names are reserved and can't be used by the programmer for other purposes.
Yes, that's all right. But a 5th procedure/option is missing. It should be:

PROCESS_VERIFIER. It's used by windows for IFEO settings.
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sample.exe
entries GlobalFlag and VerifierDlls

additonal informations:
https://scorpiosoftware.net/2024/06/01/ ... ifier-dll/
https://github.com/zodiacon/VerifierDLL ... llmain.cpp
Quin
Addict
Addict
Posts: 1165
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: DLLmain - missing procedure

Post by Quin »

+1
fryquez
Enthusiast
Enthusiast
Posts: 398
Joined: Mon Dec 21, 2015 8:12 pm

Re: DLLmain - missing procedure

Post by fryquez »

And what would be the use? VerifierDlls are only allowed to link against ntdll.dll, so you can't create one with Purebasic.
Post Reply