Author Topic: option win64:11  (Read 147 times)

2B||!2B

  • Member
  • **
  • Posts: 83
option win64:11
« on: July 12, 2021, 01:42:33 PM »
If i remove this option "option win64:11", no parameters saving is done and the dll will not load properly.
Can i have the parameters saving only without generating an exception record in the Exception Directory?

Code: [Select]
DllMain PROC  hInst:HINSTANCE, fdwReason:DWORD, lpvReserved:LPVOID
    .IF fdwReason == DLL_PROCESS_ATTACH
        mov rax, hInst
        mov hInstance, rax
    .ENDIF
    mov rax,TRUE
    ret
DllMain Endp

TimoVJL

  • Member
  • ****
  • Posts: 704
Re: option win64:11
« Reply #1 on: July 12, 2021, 08:35:54 PM »
MS link.exe supported entry points for dll:
Code: [Select]
BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
{

BOOL WINAPI _DllMainCRTStartup(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
{
 // x32
BOOL WINAPI DllMainCRTStartup(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
{
 // x64
May the source be with you