Results 1 to 6 of 6

Thread: DLL in NASM

  1. #1
    AmAdEuS
    Guest

    DLL in NASM

    sup dudes... I'm stuck @ the end of this little job:
    http://home.arcor.de/dj_amadeus/natdll.asm

    the source is compile and linked fine without any warnings...
    it's a translation from the output of vs.net's C-compiler

    the orig DLL compiled by vs.net was injected by my loader just fine.. but the NASM-one somehow can't laoded into the process.... maybe i missed some declaration needed to make it an valid win32-dll or something?
    i built it using the following settings:

    nasmw -O 42 -f obj natdll.asm
    alink -oPE -dll natdll win32.lib

    hope anyone can help me...
    amadeus
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    AmAdEuS
    Guest
    ok i found out, that i'm missing the DllMain entry point..
    i foudn this info on a dll-skelett on sourforge:
    %include "\lab\vasm\inc\nagoa.inc"

    global DllMain
    global MsgBox
    export MsgBox

    [segment .code USE32]

    proc DllMain,hInstDLL,fdwReason,lpvReserved
    mov eax,TRUE
    endproc

    proc MsgBox,param1,param2
    call MessageBoxA,0,[param1],[param2],MB_OK
    call ExitProcess,0
    endproc

    but the thing is that nasmw doesn't accept proc as an valid instruction...
    so anyone knows anything about it? finding infos on a win32-related issue for a asm-dialect that is used mainly on *NIX is pretty hard...
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  3. #3
    djnz
    Guest
    Hi,

    proc isn't a keyword that's natively supported by nasm,
    it's provided as a a macro which is declared in the file c32.mac in the misc directory.
    You might want to checkout win32nasm (ftp://ftp.szif.hu/pub/demos/tool/win32nasmbase.zip),
    which amongst other things includes an example of a dll.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  4. #4
    AmAdEuS
    Guest
    thx alot
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  5. #5
    Administrator dELTA's Avatar
    Join Date
    Oct 2000
    Location
    Ring -1
    Posts
    4,206
    Blog Entries
    5
    AmAdEuS, you are welcome to ask this type of questions here too, but the following forum would probably be much more suitable and likely to give you good and quick answers in the area of pure assembler programming:

    http://board.win32asmcommunity.net/

  6. #6
    AmAdEuS
    Guest
    i know this board... got the things fixed btw, ported everything to masm and have a nice adaptive nocd-laoder for scand bw in all their future versions...
    I promise that I have read the FAQ and tried to use the Search to answer my question.

Similar Threads

  1. Offset Independant RadASM with NASM included
    By OHPen in forum Tools of Our Trade (TOT) Messageboard
    Replies: 8
    Last Post: October 9th, 2011, 03:26
  2. NASM - GUI related question
    By OHPen in forum Advanced Reversing and Programming
    Replies: 10
    Last Post: January 31st, 2008, 08:11
  3. Need help using Ollydbg and NASM
    By pityocamptes in forum OllyDbg Support Forums
    Replies: 1
    Last Post: November 29th, 2004, 07:33
  4. about NASM
    By 0x400 in forum Tools of Our Trade (TOT) Messageboard
    Replies: 4
    Last Post: November 12th, 2000, 03:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •