Author Topic: How to define entry point for 64-bit DLL?  (Read 230 times)

jmw457

  • Regular Member
  • *
  • Posts: 8
How to define entry point for 64-bit DLL?
« 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. 

aw27

  • Member
  • ****
  • Posts: 709
Re: How to define entry point for 64-bit DLL?
« Reply #1 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.

jmw457

  • Regular Member
  • *
  • Posts: 8
Re: How to define entry point for 64-bit DLL?
« Reply #2 on: July 11, 2017, 09:15:33 AM »
Hello aw27,

I am migrating from one to the other. 

aw27

  • Member
  • ****
  • Posts: 709
Re: How to define entry point for 64-bit DLL?
« Reply #3 on: July 11, 2017, 04:35:25 PM »
I am migrating from one to the other.

Hello jmw,
Any particular reason to migrate to NASM?