The MASM Forum

General => The Campus => Topic started by: jmw457 on July 11, 2017, 08:24:55 AM

Title: How to define entry point for 64-bit DLL?
Post by: jmw457 on July 11, 2017, 08:24:55 AM
I am re-writing a 32-bit DLL assembled with Microsoft MASM to a 64-bit DLL assembled with NASM (Netwide Assembler).  I need to know how to translate the entry point. 

In 32-bit MASM it's:

FunctionName PROC PointerName:PTR DWord

However, 64-bit NASM doesn't use that convention.  So my question is, how can I define a procedure (entry point) in 64-bit NASM that passes values (either variables or pointers) from the calling program to the DLL? 

Thanks very much. 
Title: Re: How to define entry point for 64-bit DLL?
Post by: aw27 on July 11, 2017, 09:02:51 AM
The Dll entry point is DllMain.
What you want to know, it seems so, are the NASM conventions for exporting functions. :icon_rolleyes:
I just reformulate your question because I am sure you will find the answer  this way with a good search engine.
Title: Re: How to define entry point for 64-bit DLL?
Post by: jmw457 on July 11, 2017, 09:15:33 AM
Hello aw27,

I am migrating from one to the other. 
Title: Re: How to define entry point for 64-bit DLL?
Post by: aw27 on July 11, 2017, 04:35:25 PM
Quote from: jmw457 on July 11, 2017, 09:15:33 AM
I am migrating from one to the other.

Hello jmw,
Any particular reason to migrate to NASM?