August 26, 200223 yr 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 [email protected] those of you who wana take a look at the GUI so far..here it is:http://www.badazcorvettes.com/~csoftware/m...PanelEditor.JPG
August 28, 200223 yr 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
August 28, 200223 yr 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
Create an account or sign in to comment