flat assembler
Message board for the users of flat assembler.
Index
> Windows > DLL not useable from Delphi |
Author |
|
decard 11 Sep 2005, 10:18
It seems that it doesn't work because it doesn't have an import section. Add some imports, it will work then.
|
|||
11 Sep 2005, 10:18 |
|
BertaS 11 Sep 2005, 10:20
Thanks a lot. I'll try that.
|
|||
11 Sep 2005, 10:20 |
|
BertaS 11 Sep 2005, 11:03
Didn't work.
Added this: Code: section '.idata' import data readable writeable library kernel, 'KERNEL32.DLL', user, 'USER32.DLL' import kernel, GetLastError, 'GetLastError' import user, MessageBox, 'MessageBoxA' This is what Windows tells me: "The application or DLL "test.dll" is not a valid Windows image" Any idea? |
|||
11 Sep 2005, 11:03 |
|
decard 11 Sep 2005, 12:14
That's because import macro doesn't actually import any function if you don't use it somewhere. Try to add a "dummy" reference to any function, for example:
Code: dd GetLastError (add it somewhere in code section. |
|||
11 Sep 2005, 12:14 |
|
BertaS 11 Sep 2005, 14:02
Okay, that did it! Thank you VERY much! That was a big help for me! Hope I can help you someday. |
|||
11 Sep 2005, 14:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.