flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > IMPORT32 Problem?

Author
Thread Post new topic Reply to topic
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
library kernel32,'KERNEL32.DLL',\
user32, 'USER32.DLL',\
comdlg32,'COMDLG32.DLL',\
ole32, 'OLE32.DLL',\
ntdll,'NTDLL.DLL',\
shell32, 'SHELL32.DLL'






;-----------------------------------------------------------------------
include '%fasminc%\apia\kernel32.inc'
include '%fasminc%\apia\ntdll.inc'
include '%fasminc%\apia\user32.inc'
include '%fasminc%\apia\comdlg32.inc'
include '%fasminc%\apia\ole32.inc'
include '%fasminc%\apia\shell32.inc'


I converted the ntdll to an inc.....

It gives me this error...C:\WinAsm\Assemblers\fasm\INCLUDE\apia\ntdll.inc [1]:
import ntdll,\
C:\WinAsm\Assemblers\fasm\INCLUDE\macro/import32.inc [31] import [3]:
if used label
error: reserved word used as symbol.
Post 22 Sep 2005, 20:50
View user's profile Send private message Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
It is because ntdll exports some procedures that are words reserved in assembly. I am not 100% percent sure, but I guess it is fdiv, maybe fsin... Check these and try to compile again
Post 22 Sep 2005, 22:23
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
One of the labels you try to import from ntdll is an reserved symbol. You can see the "Instruction" field in the fasmw's error report window to check out which one is it exactly.
Post 22 Sep 2005, 22:23
View user's profile Send private message Visit poster's website Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
C:\WinAsm\Assemblers\fasm\INCLUDE\macro/import32.inc [31] import [3]:

import label 3?


import ntdll,\
PropertyLengthAsVariant,'PropertyLengthAsVariant',\
RtlConvertPropertyToVariant,'RtlConvertPropertyToVariant',\
-------> RtlConvertVariantToProperty,'RtlConvertVariantToProperty',\

So its that one?? Whats wrong with it?
Post 22 Sep 2005, 23:18
View user's profile Send private message Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
Ok I used fasmw and it highlighted the whole ntdll.inc as wrong
Post 22 Sep 2005, 23:30
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7796
Location: Kraków, Poland
Tomasz Grysztar
Look inside the "Instruction" field in the error report dialog window.
Post 23 Sep 2005, 06:24
View user's profile Send private message Visit poster's website Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
Ok this is what it shows in the instruction

It highlights both ntdll and import32.inc

and in the instruction box is this :

if used fabs



Do I have to post a screenshot?
Post 23 Sep 2005, 18:30
View user's profile Send private message Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
No one can help ME!?
Post 25 Sep 2005, 15:00
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
shism2 wrote:
Ok this is what it shows in the instruction

It highlights both ntdll and import32.inc

and in the instruction box is this :

if used fabs



Do I have to post a screenshot?


From this you can see that fabs is a reserved symbol (it is an instruction). You have to remove a line with this import from ntdll.inc, or (if you really to use fabs function) - change its name:

Code:
import ntdll,\
(...)
fabs_,'fabs',\    
Post 25 Sep 2005, 17:25
View user's profile Send private message Visit poster's website Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2
ya I found that out after lol Smile

Still cant use the apis though.. It gives me access denied Sad
Post 26 Sep 2005, 00:18
View user's profile Send private message 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.