suprised that can't code with structure

the document says:
Structures cannot be created in code. You must create them in the IDE by adding a Structure to your project item.

guess I willing to parse hundreds of structure from old codes… i will type it one by one…

too tired for me…

Unless for very specific rare reasons you should not use structures but classes.

By the way:

If the “old code” is REALbasic code, you can copy the stuctures from the RB IDE to the navigator in the Xojo IDE, so no typing.

You could also look at how a structure looks like in a project which is stored as “Xojo project” instead of a “Xojo Binary project”:

#tag Structure, Name = stat, Flags = &h1 dev as UInt32 ino as UInt32 mode as UInt16 #tag EndStructure
So you could add the structure definitions this way.

Last remark: if the “old code” is very old, you need to check if you have to adapt the structures (32bit –> 64bit).