VB Decompiler Forum Index VB Decompiler
Hosted by TheAutomaters.com
 
  MemberlistMemberlist
 

Designer Info

 
   VB Decompiler Forum Index -> Structures
Author Message
_aLfa_
Site Admin


Joined: 21 Sep 2002
Posts: 233
Location: Aveiro, Portugal

Posted: Mon Aug 23, 2004 5:07 pm     Post subject: Designer Info

Parents:
COM Registration Info

Code:
Type DesignerInfo
uuidDesigner(15) As Byte '0x00 (00d) CLSID of the Addin/Designer
lStructSize As Long '0x10 (16d) Total Size of the next fields

sAddinRegKey As bStr '0x14 (20d) Registry Key of the Addin

sAddinName As bStr '0x16 (22d) + iSizeAddinRegKey Friendly Name of the Addin

sAddinDescription As bStr '0x18 (24d) + iSizeAddinRegKey _
+ iSizeAddinName Description of Addin

lLoadBehaviour As Long '0x1A (26d) + iSizeAddinRegKey _
+ iSizeAddinName _
+ iSizeAddinDescription CLSID of Object

sSatelliteDLL As bStr '0x1E (30d) + iSizeAddinRegKey _
+ iSizeAddinName _
+ iSizeAddinDescription SatelliteDLL, if specified

sAdditionalRegKey As bStr '0x20 (32d) + iSizeAddinRegKey _
+ iSizeAddinName _
+ iSizeAddinDescription _
+ iSizeSatteliteDLL Extra Registry Key, if specified

lCommandLineSafe As Long '0x22 (34d) + iSizeAddinRegKey _
+ iSizeAddinName _
+ iSizeAddinDescription _
+ iSizeSatteliteDLL _
+ iSizeAdditionalRegKey Specifies a GUI-less Addin if 1
'0x14 + lStructSize <-- Structure Size
End Type

Type bStr
Size As Integer
Str As String * Size
End Type


Notes:
This structure is an extension to the COM Registration Info structure if COMRegInfo.fIsDesigner <> 0 (Designer)

Greetings to Alexandru Ionescu for decoding this structure


Last edited by _aLfa_ on Wed Aug 25, 2004 12:07 pm; edited 2 times in total
Back to top
MrUnleaded
Site Admin


Joined: 21 Sep 2002
Posts: 385
Location: California

Posted: Mon Aug 23, 2004 5:23 pm     Post subject:

By augmentation.....do you mean it goes afterwards? similar to OptionalObjectInfo?

Also....is there another way we can do this struct....because it looks awfully confusing... as there is overlapping section(i assume based on the type of the struct.) and if it is based on the type of struct...perhaps several structs or even an appending struct should be made?

Thoughts?
_________________
-MrU
Back to top
ionescu007
Sometimes here


Joined: 21 Aug 2004
Posts: 33

Posted: Tue Aug 24, 2004 4:43 am     Post subject:

Unforunately, because of the dumb-headness of VB, variable UDTs don't really work out nicely. The whole idea is to treat the structure stable only until the first bstr, whose first long is the size of the upcoming string. Everything past that is variable and the best would be to use a dynamic array. Worse, you can't know in advance which strings are present or not, since you must actually read their size, and skip if 0.

This is sadly a limitation of VB

Best regards,
Alex Ionescu
Back to top
Dr Memory
Expert


Joined: 16 Aug 2004
Posts: 147
Location: Surrey, UK

Posted: Tue Aug 24, 2004 6:46 am     Post subject: Dynamic UDT's

VB6's reluctance to let you use a UDT that way has been a source of grief for many people over the past decade, that's for sure!


It is, however, just that - reluctance, not a limitation. It's perfectly capable of doing it for you, but making it available would require acknowledgement that it opens the door to open-slather pointer operations, making it all too easy for the average VB Joe in the street to screw his application

Like "can't build normal dll's", and several other famous problems, mythical beasts, the ability to apply an arbitrary UDT mapping to an address of your choosing is not so hard....

Have you never "rolled your own"???


Dynamic array, I mean, not a spliff! :chuckle:


You CAN have your cake (access Fred.Member.SubMember), and eat it too (set Fred.Address yourself). I do it all the time!
Back to top
ionescu007
Sometimes here


Joined: 21 Aug 2004
Posts: 33

Posted: Tue Aug 24, 2004 10:48 am     Post subject:

If you're thinking of doing:

UDT Foo
Bar as Long
BarString() As String
Bar2 as Long
Bat2String() as String
Bar3 as Long
etc...

and then manually reading the first long, then copying into the strptr/varptr of the string array, you'll notice that the structure isn't alctually contigous (because of dynamic OLESAFEARRAYS) and if you'll want to read the whole thing at once (in the case of passing it to an API, I know it won't happen here), you'll run into a dead end.

In other news, I've found out the unknown/flag parts of ProjectInfo 2 and will be updating the PDF when I get back from school tonight.

Best regards,
Alex Ionescu
Back to top
MrUnleaded
Site Admin


Joined: 21 Sep 2002
Posts: 385
Location: California

Posted: Tue Aug 24, 2004 3:56 pm     Post subject:

Several of the structures here will simply not work when copied and pasted into VB5/6/.Net but they are all in a format that isnt too confusing to understand.

Anyways it looks like it has changed since my last view.

I guess it is just the +iSizeAddinRegKey +iSizeAddinName +... stuff that represents the offset that is confusing me....

Usually for something like this i load up the entire struct into a custom buffer....size equal to lStructSize....and then "pop" off variables....

Code:

Type DesignerInfo
uuidDesigner(15) As Byte '0x00 (00d) CLSID of the Addin/Designer
lStructSize As Long '0x10 (16d) Total Size of the next fields
End Type

buffer.Load(cFile,DesignerInfo.lStructSize,Offset)

sAddinRegKey = buffer.PopString()
sAddinName = buffer.PopString()
sAddinDescription = buffer.PopString()
lLoadBehaviour = buffer.PopLong()
.....



This is just me...i dont understand Dr. Memorys way.....i dont usually try to read things from memory or load things into memory....
_________________
-MrU
Back to top
_aLfa_
Site Admin


Joined: 21 Sep 2002
Posts: 233
Location: Aveiro, Portugal

Posted: Tue Aug 24, 2004 4:32 pm     Post subject:

I use something like that too.
And in VB .NET is even easier to do that
_________________
One thing only I know, and that is that I know nothing. (Socrates)
Back to top
Dr Memory
Expert


Joined: 16 Aug 2004
Posts: 147
Location: Surrey, UK

Posted: Tue Aug 24, 2004 5:51 pm     Post subject:

Was that explanation a little too brief?

Oops! Sorry about that!

I'll fix that, but before I do, can you tell me, what methods are you and/or people here generally using to examine EXE files?

I mean, are you accessing it as a file or as an image?

Cheers
Back to top
Dr Memory
Expert


Joined: 16 Aug 2004
Posts: 147
Location: Surrey, UK

Posted: Tue Aug 24, 2004 5:58 pm     Post subject:

"something like that in VB.NET"

Omygawwd!


Don't worry, they'll probably develop a cure soon!
Back to top
   VB Decompiler Forum Index -> Structures All times are GMT
Page 1 of 1

 
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