flat assembler
Message board for the users of flat assembler.
Index
> Windows > Importing API functions by their ordinals. Is it safe? |
Author |
|
UCM 26 Aug 2006, 16:46
Probably, since the C lib's use ordinals (as far as I could tell.)
|
|||
26 Aug 2006, 16:46 |
|
vid 27 Aug 2006, 09:16
UCM: can you give some examples?
|
|||
27 Aug 2006, 09:16 |
|
UCM 27 Aug 2006, 13:41
Well, I looked at the import section of an executable I had linked from an OBJ (from FASM), and there were no human-readable names there.
|
|||
27 Aug 2006, 13:41 |
|
vid 27 Aug 2006, 13:57
wasn't it that you linked to LIBCDLL.DLL with ordinals? not to kernel32.dll etc? and LIBCDLL.DLL uses strings, not ordinals...
|
|||
27 Aug 2006, 13:57 |
|
UCM 27 Aug 2006, 17:21
I did not link to the C library, only to the system DLL's (kernel32 and user32.)
|
|||
27 Aug 2006, 17:21 |
|
Garthower 28 Aug 2006, 10:05
Whether it is safe? Here there is only one way - most to check up To take DLL from, say, WinXP and Win98, and to look ordinals on interesting you API. But anyway, if MicroSoft speaks, that such support will not be conducted, to mean so it and will be. So it is better to not experiment, that then it was not need to rewrite a code.
|
|||
28 Aug 2006, 10:05 |
|
peter 29 Aug 2006, 08:46
It's not safe. See http://blogs.msdn.com/oldnewthing/archive/2006/07/18/669668.aspx
Also read http://blogs.msdn.com/oldnewthing/archive/2006/07/28/681473.aspx about efficiency of ordinal-based imports. BTW, FASM does not set a look-up hint, while Microsoft's linker (in MASM or VC++) sets it. |
|||
29 Aug 2006, 08:46 |
|
shism2 29 Aug 2006, 14:12
So there is no way to use FASM with ordinals ?
|
|||
29 Aug 2006, 14:12 |
|
Garthower 29 Aug 2006, 14:34
Quote:
No, the way is. Manual loading API by means of GetProcAddress. |
|||
29 Aug 2006, 14:34 |
|
f0dder 29 Aug 2006, 14:37
Garthower wrote:
...or using object module output, and link against import libraries with ordinals. _________________ - carpe noctem |
|||
29 Aug 2006, 14:37 |
|
Tomasz Grysztar 31 Aug 2006, 08:34
shism2 wrote: So there is no way to use FASM with ordinals ? The "import" macro is capable of importing functions by ordinal (see Win32 headers docs). However the "export" macro currently doesn't allow you to set up the fixed ordinals in your own DLL. |
|||
31 Aug 2006, 08:34 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.