at first, i tought to use the existing mozip as a library, and call the relevant functions from the C# code. but since mozip is so command-line oriented, i reached a conclusion this won't be possible without serious modifications to the original code, that will in effect make it useless for the original mozip. so i decided to port mozip to C# entirely, and call all the Win32 API it uses from the C# code. this isn't so trivial, since the Win32 API is in C, but C# has a special syntax for accomplishing that, and that worked out nicely. i was even able to pass a C# function to the API C function to run.
so far i wrote the part that opens the installer and displays the moduls in it. now i have to clear the bugs from it so it actually works 🙂
while at it i found some problems in the original code, such as un-released memory, unused variables, what seems like insufficient memory allocation, one function that is never called from anywhere else, and terrible indentation. i'll sum this up and send it to piaip, the mozip creator.