flat assembler
Message board for the users of flat assembler.
Index
> Main > Rewrite from C++ to FASM |
Author |
|
Snejk47 04 Aug 2011, 14:47
Hi all, I'm new here
I have C++ source file (SDK header) and i wanna convert it to FASM. C++ file and what i now have done. I wanna rewrite all but i don't know how to convert for example this: Code: struct TPluginInfo { int cbSize; wchar_t* ShortName; int Version; wchar_t* Description; wchar_t* Author; wchar_t* AuthorMail; wchar_t* Copyright; wchar_t* Homepage; char Flag; int ReplaceDefaultModule; }; How can I check what I have to insert instead of an "int" or "unsigned int" or "wchar_t *"? Snejk. |
|||
04 Aug 2011, 14:47 |
|
AsmGuru62 04 Aug 2011, 17:22
Also, different structure packing options in C++ may cause a misalignment of last field in a structure in FASM.
|
|||
04 Aug 2011, 17:22 |
|
addes3 04 Aug 2011, 22:08
You should change the DB's to EQU's.
And the L"" are wide (unicode) strings, so just wrapping them in single quotes may not work. |
|||
04 Aug 2011, 22:08 |
|
rain_storm 06 Aug 2011, 02:28
The FASM equivelent would look something like this
Code: struct TPluginInfo cbSize dd ? ShortName dd ? Version dd ? Description dd ? Author dd ? AuthorMail dd ? Copyright dd ? Homepage dd ? Flag dd ? ; assumes that char is padded to dword alignment ReplaceDefaultModule dd ? ends |
|||
06 Aug 2011, 02:28 |
|
addes3 12 Aug 2011, 20:45
|
|||
12 Aug 2011, 20:45 |
|
Overflowz 12 Aug 2011, 23:02
rain_storm
maybe this would be better ? Code: struct TPluginInfo .cbSize dd ? .ShortName dd ? .Version dd ? .Description dd ? .Author dd ? .AuthorMail dd ? .Copyright dd ? .Homepage dd ? .Flag dd ? ; assumes that char is padded to dword alignment .ReplaceDefaultModule dd ? ends |
|||
12 Aug 2011, 23:02 |
|
Snejk47 13 Aug 2011, 16:04
Thank you very much for all
|
|||
13 Aug 2011, 16:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.