flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 05 Nov 2011, 22:42
Use STARTUPINFO.size
You never defined sizeof.STARTUPINFO anywhere. Same with sizeof.sockaddr_in. It will be undefined also. |
|||
![]() |
|
Havok 05 Nov 2011, 22:49
It says I haven't defined "STARTUPINFO.size" either when I use it. I obviously have to learn how to define these things correctly.
|
|||
![]() |
|
Tomasz Grysztar 05 Nov 2011, 22:55
You should have used it this way:
Code: mov [f.cb],f.size STRUC directive is just a kind of macro, that's why it doesn't define any constants by itself, only when you actually use it. Note that sometimes the structure may not have fixed size and then you'd have "f.size" be different from "g.size" even when "f" and "g" were defined using the same "struc" macro. |
|||
![]() |
|
Havok 05 Nov 2011, 23:07
Ah now i'm starting to understand it. Thanks to the both of you. Tomasz you've made a wonderful assembler, thank you. Taking a bit to get used to, but I can't wait to get more involved in it.
|
|||
![]() |
|
AsmGuru62 05 Nov 2011, 23:13
You get sizeof 'thingy' when using struct/ends macros, like MASM declares it.
|
|||
![]() |
|
Havok 05 Nov 2011, 23:30
thanks for that AsmGuru62. I haven't look at any MASM examples. I need to do more homework it seems
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.