UIRibbon continues
Fabian Maurer
dark.shadow4 at web.de
Sat Dec 22 10:42:56 CST 2018
Hi Huw, Hi Nikolay,
thanks for the quick response!
> I suspect how you write the parser will depend to some extent on the
> format of the binary blob itself, so I'd suggest getting a good
> understanding of that before you attack the coding.
Actually, I can do both at the same time. I'm working with a tool called Kaitai Struct,
basically I'm writing the specification and generate a parser from that. Though I needed to
roll my own C-generator, for better or worse.
> If it turns out to basically be a
> binary representation of xml, then it may be appropriate to look at an
> xml parser (e.g. dlls/ntdll/actct.x).
I'm afraid it's most likely not that simple. The compiler does a lot of rearranging the data,
it's not much like the original XML anymore.
> Once you start coding, you could send the outline parser or tests to
> wine-devel as an RFC. The good news is that figuring out the format
> of the blob is likely to take much longer than actually coding, so any
> false steps that you might make are not going to affect the overall
> effort too much.
That's probably very true.
FWIW, I have the complete project on github. The parser is here: https://github.com/
DarkShadow44/UIRibbon-Reversing/blob/master/test/tests/UIRibbon/parser_uiribbon.c
Would that code style be okay?
As said, this is generated from the file definition format I'm creating. And since I generate
this with a small C# program (also part of this repo), I can adjust the code as needed.
> Another approach could be to implement the tool that creates such blobs,
> MS build tools must have something for that. This way you can start with
> minimal possible ribbon description, then tickle input and see what
> comes up in the blob.
Yes, there is UICC.exe to turn a xml into a blob. I use that to reverse engineer the format -
change the xml, see how the blob changes. Is that what you mean?
I don't quite understand why I would want to implement the tools that creates the blob
though, that needs to do a lot of validation that isn't really needed to 'just' decode the
blob.
> I don't know if activation context code is useful for that, it does not
> use binary xml representation, your case could be closer xaml/baml.Maybe
> you can check WPF opensource project for that, it supposed to provide
> Xaml implementation. (WPF has its own Ribbon control by the way,
> probably separate from win32 one).
Yeah, I looked into baml - but to me it looks completely different. A shame really, would
have made it a lot easier.
Regards,
Fabian Maurer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20181222/cb963dbb/attachment.html>
More information about the wine-devel
mailing list