flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > using cinvoke macro with <...>

Author
Thread Post new topic Reply to topic
primer



Joined: 05 Nov 2010
Posts: 12
primer 16 Nov 2010, 10:47
hi, I have a problem when using in cinvoke with PE64 format file, source code is like this:

Code:
format PE64 console
include 'win64ax.inc'

.data
       somedd dq 0xFFFFFFFF
.code
start:     
    cinvoke printf,<"pi = %f",13,10>,3.14            ; i want to add newline char
       invoke ExitProcess,0
.end start
    


1 . It works fine with PE 32bit, but not with PE64. Is this a bug?

2. Can I use library more than one time? I want to do this in win32ax.inc

Code:
define CRT 'msvcrtd100.dll'

library kernel32,'KERNEL32.DLL',\
       user32,'USER32.DLL',\
            gdi32,'GDI32.DLL',\
      advapi32,'ADVAPI32.DLL',\
        comctl32,'COMCTL32.DLL',\
        comdlg32,'COMDLG32.DLL',\
        shell32,'SHELL32.DLL',\
          wsock32,'WSOCK32.DLL'
if defined CRT
library msvcrt,CRT

import msvcrt,\
    printf,'printf'
end if
    


thanks.
Post 16 Nov 2010, 10:47
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20355
Location: In your JS exploiting you and your system
revolution 23 Nov 2010, 14:24
primer wrote:
2. Can I use library more than one time?
No. You have to create you own import section instead, or use a different library macro.
Post 23 Nov 2010, 14:24
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.