flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 23 Feb 2005, 02:07
The most functions in Win32 API exists in two variants: ANSI (or ASCII) with suffix "A" and WIDE (or UNICODE) with suffix 'W' - that are mostly the fuctions that deal (even indirectly) with strings. Usually in one application it is very rare case to be used both - ASCII and UNICODE function, so it is common practice to be imported only one of them (and probably it will be ASCII function).
You can notice also, that in FASM package, there are two sets of include files - W and A. For your case, I would suggest you to use A variant. As far as, these functions do the same thing, only with difference in string formats, in help files you can read only one description of the function. AFAIK, in WinNT/2000/XP, there is only one UNICODE function and the "A" function simply converts ASCII strings to UNICODE format and pass them to the original UNICODE function. In Win95/98/ME convertion is reversed - the main function is ASCII and the "W" function make convertion and calls "A" function. Regards. |
|||
![]() |
|
mindflyr 23 Feb 2005, 18:25
Thank you JohnFound. So far I successfully read and wrote a small binary file with the following. I'll try the 'A' after ReadFile and WriteFile soon.
section '.idata' import data readable writeable library kernel,'KERNEL32.DLL',\ ... import kernel,\ ... CreateFile,'CreateFileA',\ ReadFile,'ReadFile',\ WriteFile,'WriteFile',\ CloseHandle,'CloseHandle',\ ExitProcess,'ExitProcess' |
|||
![]() |
|
mindflyr 24 Feb 2005, 19:05
ReadFileA and W say "no entry point found in dll".
Same for WriteFileA and W. And also I tried CreateFileW, but it crashed, probably because I should have a different kind of string for the pathname of the read_filename. But everything works great with CreateFileA and ReadFile and WriteFile. |
|||
![]() |
|
JohnFound 24 Feb 2005, 19:49
Well, ReadFile is not a function that deals with strings, so there is no need to exists in 2 variants.
Better check and use existing import files in FASM include/APIA or include/APIW directories. It is simply waste of time to build your own import sections. Regards. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.