The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: 2B||!2B on July 12, 2021, 01:42:33 PM

Title: option win64:11
Post by: 2B||!2B 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?

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
Title: Re: option win64:11
Post by: TimoVJL on July 12, 2021, 08:35:54 PM
MS link.exe supported entry points for dll: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