Sign in to follow this  
Guest Eugen

Need help with VB or C# Declaration for GAU files

Recommended Posts

Hello everyone.I'm new to this forum, but I hope I post this in the right forum.I working on a project where I write a Panel and Gauge Editor.The Edior will only support XML Style Gauges in "Edit" Mode.But I would like to include a functionality to view native compilled gauges as well.It's here I could need some help, I need to define a "c++" style declarations and structures in VB.NET or C#.NET so I am able to view the gau files.Hope it's some one out there who can help me.Thanks in the advanc.Regards,Richard Eikelandrichard_eikeland@msn.comfor those of you who wana take a look at the GUI so far..here it is:http://www.badazcorvettes.com/~csoftware/m...PanelEditor.JPG

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,I am not sure what you mean decompiling the c-source ? or extracting bitmaps. In the later case there are some tools like Chuck Dome's gaubmp2 to browse the bitmaps in the gauge file. You can also use the old borland resource workshop to view bitmaps in gau filesThere is a delphi component with source that loads resource bitmaps, I have not had the time to try it out maybe you will get some ideas studying the source code... http://www.tempest-sw.com/freeware/freeware.cgi?DelphiBrgdsEugen

Share this post


Link to post
Share on other sites

I have no real knowledge in VB.net or C#.net, only in C and C++. In my opinion it is possible to "read" a compled gauge. In C I would load it with "LoadLibrary", search the entry point "Linkage" with "GetProcAddress(...,"Linkage")". At an offset of 6*4 byte a null terminated array of pointer to "GAUGEHDR" begins. For each pointer you can make a jump to the "GAUGEHDR", here the element list branches where similar steps through the tree-like structure have to be made.You can obtain almost all information of the gauge itself, but you still need to lookup the bitmaps in the resource part of the file.I haven't tried it by myself, but I had a look at my gauge sources and the binary results and it should be possible to figure out the gauge structure "from backwards", I doubt it is easy though.Arne Bartels

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this