Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hacking a menu system (Part II)
Message
From
04/05/2004 12:22:04
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Hacking a menu system (Part II)
Miscellaneous
Thread ID:
00900815
Message ID:
00900815
Views:
46
Hi,

I'm (still!) trying to catch the whole structure of a VFP app menu system (please see thread #899707). My first attempt was to loop thru its structure using common VFP's builtin functions, but that fails in many ways:

- I cannot get deeper than first level menus (based of _MSysMenu)
- There is not a function to return the 'MESSAGE' part of a Pad/Bar
- There is no way to catch the "Skip For" part
- and the list goes...

The next approach that came to my mind was to hack the executable. For that purpose I just oppened an app's executable (using VFP's source code editor) and took a look around. Its structure, besides being unknown to me, seemed not so complicated and I could recognize many elements of the menu system in it. A sample of it looks like:
.BUILD_MENU..NRETCODE
.MAKELOGOFF..GDIRAGCOUSERDBF..GSESSIONz,..7….
.T.....-....s......"..
..\<Sistema......Alt+S...1...............s.....6.s..........".."...\<Sobre......
.......................s.........."....\-
..6.s..........".."...\<Log.de.Transações.Efetuadas.....6.s.........."
.."...\<Usuários.Ativos.no.Sistema........s.........."....\-
..K.s..........".."...Sai\<r...............................Alt+R.....Alt+R...p.1
............^.cNull.=.MessageBox.(gAboutMessage,.(0+64+0),.
".Sobre.o.PPD.-.Product.Planning.&.Distribution").
[.1............I.Do.BrowseLog...In..InvMaqAudt..with..gMySelfUser,.Date.(),.gLongName
,..T..?.1............-
.Do.SeeActUsers.In..InvMaqAudt..with...T.,."S"...1............
.Do.FimProg.
.........º
I changed all non-printable caracters (and some other crazy ones) by "." and inserted some carriage returns for the sake of readability.

There are programs like Refox that hack an executable and can bring it to source code, so that's not an impossible task (please I'm not trying to "rewrite" a Refox here, just wanting to get thru the menu system). Also it is common practice hack forms, reports etc, so that's not a big deal, right?

My question is: where can I find information regarding the executable structure, its sections, conventions and the like?

TIA,

Fernando
Next
Reply
Map
View

Click here to load this message in the networking platform