|
VB Decompiler Hosted by TheAutomaters.com
|
Author |
Message |
Anonymous New User
Joined: 10 Feb 2008 Posts: 0
|
Posted: Tue Mar 02, 2004 2:52 am
Post subject: UDTs
|
|
I noticed VB uses some sort of "descriptor" when copying and destroying dynamic UDTs. I was wondering if anybody knew what the format of that descriptor is, and if there's any way to get that descriptor knowing only the variable's address.
|
|
Back to top |
|
|
|
golem Often here
Joined: 18 Nov 2002 Posts: 73
|
Posted: Thu Mar 04, 2004 11:52 pm
Post subject: Don't know why we bother with this field...
|
|
The silence in response to your question is deafening, PGuerra.
Is no one able to answer such a simple question?
Carry on!
golem
|
|
Back to top |
|
|
|
golem Often here
Joined: 18 Nov 2002 Posts: 73
|
Posted: Thu Mar 11, 2004 3:16 pm
Post subject: UDTs...
|
|
In the VB IDE, if you look at a UDT in the object browser, it is considered a class as a member of the project+module/frm it belongs to. The UDTs elements are considered members of that UDT.
What does this tell you?
Carry on!
golem
|
|
Back to top |
|
|
|
Anonymous New User
Joined: 10 Feb 2008 Posts: 0
|
Posted: Sun Mar 14, 2004 5:14 am
Post subject:
|
|
Mmmmm.... nothing?
|
|
Back to top |
|
|
|
golem Often here
Joined: 18 Nov 2002 Posts: 73
|
Posted: Sun Apr 25, 2004 4:56 pm
Post subject: All right people...
|
|
It's called a structure!
You know those organizational thingies programs used to group related information.
Though your inquiry PGuerra is about 'dynamic' UDTs, for all intensive purposes dynamic and static UDTs are essentially the same thing, with minor differences to support the actually defined element count, dimensions, etc...
Like I might have mentioned once or 15 times... An understanding of scope, which I have YET to see even anyone acknowledge the existence of, really helps to put on context on the information contained within the UDT structure.
It works like this, for each context (local, module, etc.), you have a variable structure (though it may be empty ), if that scope references a variable that is a UDT (either dynamic or static), it will have a pointer to the header that defines the UDT structure.
Parsing that structure will give the definition of the of the UDT elements! Yes, it is THAT simple... (Though, , the UDT structure suffers from the basic omission as the variable definitions found in the other contexts (local, module, etc. ) which is probably why you geniuses have yet to figure out how it all works. ).
So... To answer your question PGuerra...
>I was wondering if anybody knew what the format of that descriptor is,
>and if there's any way to get that descriptor knowing only the variable's
>address.
It is not as simple as what you propose: (use the variables address to look up the descriptor... , but includes an additional step.
You use the variables address to determine which scope the variable falls into (local, module, etc.), looking that variable up in the appropriate variable structure... if it is a UDT (dynamic or static), you use the offset contained within that specific variable definition/reference to jump to the UDT structure header.
Tada!
(You may, if you are so inclined, bow down and pay homage to me... )
Carry on!
golem
|
|
Back to top |
|
|
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|