Home
Blogs
Forums
Files


Welcome to The Green Button          Sign in | Join | Help

Rebuilding ehshell.exe with ilasm.exe

Last post 04-30-2008, 2:28 PM by harryf. 12 replies.
Sort Posts: Previous Next
  •  02-04-2008, 8:02 AM 240920

    Rebuilding ehshell.exe with ilasm.exe

    This post is for those of you who have successfully edited the ehshell.exe:

    When you ildasm your ehshell.exe and then immediately recompile using ilasm, does your exe have the same exact file size?

    My exe tends to lose about 36kb or so (from 3144kb to 3108kb), even though I don't get any errors when recompiling. The res file seems to be working. I say this because my new exe has the correct icon, and when using a resource editor to view all the resources, they all seem to be there.

    I know editing this exe might be a shady topic on this forum, but I'm just asking for other users' experiences when doing this.

    I haven't tested the new exe file; this is kind of just a R&D type of question.

    Thanks in advance.
  •  02-04-2008, 8:33 AM 240928 in reply to 240920

    Re: Rebuilding ehshell.exe with ilasm.exe

    out of curiosity, to what end are you modifying it?

    http://www.spore.com/view/profile/Vengence_IRL
  •  02-04-2008, 8:54 AM 240936 in reply to 240928

    Re: Rebuilding ehshell.exe with ilasm.exe

    I'd like to add some functionality to the EPG to remind me when a show is about to start. I've read on these forums that the functionality doesn't exist because - "well, why don't you just record the show..." And while I could do this, sometimes I'd like to just watch the show right now and not record it. My old Comcast set-top had this, and I liked it a lot.

    I found my entry points in order to insert this functionality into the EPG... I just want to make sure I'm recompiling correctly before I try anything.

    If you're really curious about it:

    I plan on adding a new string to the strings.xml resource to add a new context menu. Then in MediaMenuItem.BuildMediaContextMenu I will add a case for this new item. In VideoGuidePage.ConstructContextualCommands I will add the context menu to the selected EPG item. And finally, in VideoGuidePage.HandleContextMenu, I will add the functionality to set a reminder for myself. Most likely the reminder will have to come from a background plugin which checks to see if I have reminders scheduled and if the time is approaching, etc.

    If you have any feedback, or criticisms for me... please let me have it. I'm new to the modding of MCE, so it would be nice to talk to some people who have been successful.
  •  02-05-2008, 7:21 AM 241143 in reply to 240936

    Re: Rebuilding ehshell.exe with ilasm.exe

    Since no one can help, I'm just going to try it and see what happens.

    This is what I've done so far, for those of you who are checking on my progress with this mod:

    I've changed my idea from adding a menu into the context menu of the EPG to adding a button in the Program Info page. So when you click on a show that will start in the future, it will load the Program Info page. This is where you can choose options like, "Record", "Record Series", "Advanced Recording", and "Other Showings".

    In order to do this, I will need to do:

    (1) Modify the "strings.xml" resource in ehres.dll to include a new xml entry for my "Reminder" text.
    (2) Modify the "videoprograminfo.xml" resource in ehres.dll to include a new xml entry for the "Reminder" button. This will also include the id of the button, along with a function to call when it is clicked.
    (3) Modify the VideoProgramInfoPage class in the MediaCenter.Video namespace in ehshell.exe to include a new button variable, and new onclick_event function.
    (4) Modify the SetButtonVisibility() function to show my button whenever it would show the "Record" button -- because this is the only time a reminder would need to show up (a show in the future that's not already being recorded).
    (5) Add code to the new onclick_event to set my reminder. Right now, I'll just pop up a Hello World dialog to see if it will actually work.

    I'm about half-way done this. I'll report back with my findings. I'm hoping I don't just fall flat on my face ;)

    Again, if someone wants to offer some advice... please feel free.
  •  02-05-2008, 7:28 AM 241145 in reply to 241143

    Re: Rebuilding ehshell.exe with ilasm.exe

    I for one would love to have this feature, it is something that I used a lot on my Sky box before it was hooked up to media center.Cool [H]
    Steve
  •  02-05-2008, 9:50 AM 241189 in reply to 241145

    Re: Rebuilding ehshell.exe with ilasm.exe

    I used that feature a TON before I hooked up my MCE box, and I find that I don't miss it at all

    if you're watching a channel, you're recording it already

    i'd much rather just watch the show whenever, and without commercials ;)


    that being said, I can see this being really useful for sports events that you want to watch live
  •  02-06-2008, 7:16 PM 241564 in reply to 241189

    Re: Rebuilding ehshell.exe with ilasm.exe

    Here is the latest in battle with ehshell.exe:

    I added all of the functionality that I wanted in the ehshell.exe, and got it to recompile. However, when trying to replace the real ehshell, it just wouldn't work. I continue to get a strong name validation error, even after I tried sn -Vr and removing the strong name from the exe.

    I'm sure there is probably an important factor I'm missing here, but I'm very new to all of this.

    I guess it's good news that I actually got the code to compile, though. One thing at a time I suppose.


    EDIT:  This morning I did some Strong Name research and figured out how to sign my exe. It passes validation now when doing sn-vf ehshell.exe, so I'm confident this will at least pass validation (when I try it again tonight).
  •  02-07-2008, 11:58 PM 241874 in reply to 241564

    Re: Rebuilding ehshell.exe with ilasm.exe

    Keep us posted!
  •  02-13-2008, 10:54 AM 243051 in reply to 241874

    Re: Rebuilding ehshell.exe with ilasm.exe

    Replacing the shell failed again. I'm obviously doing something wrong. I resigned the exe with a new key pair, and it's still failing strong name validation.

    Any help from the modders out there?
  •  02-13-2008, 11:55 AM 243069 in reply to 243051

    Re: Rebuilding ehshell.exe with ilasm.exe

    I do all my modding with a dremmel and/or duct tape

    sorry chief
  •  02-13-2008, 12:23 PM 243082 in reply to 243069

    Re: Rebuilding ehshell.exe with ilasm.exe

    Advice: Go to SageTV.  Many more opportunities to modify, including a customization studio, which can be used to modify the menus and other interface elements, even by people like me that don't know their ilasm from their assm.

    WRK

  •  04-21-2008, 3:34 AM 258006 in reply to 243051

    Re: Rebuilding ehshell.exe with ilasm.exe

    harryf:
    Replacing the shell failed again. I'm obviously doing something wrong. I resigned the exe with a new key pair, and it's still failing strong name validation.

    Any help from the modders out there?

    Have you made any progress on this?

    It doesn't surprise me that signing your .exe doesn't fix the problem.  You would need to sign it with Microsoft's key, not one that you've just generated.  Since you don't have Microsoft's key (I assume) then you can't use signing to pass strong name validation.

    But, there is another way.  Simply turn off security (with "caspol -s off" command) and I would think that will fix your strong name validation issue.

    Pete

  •  04-30-2008, 2:28 PM 259956 in reply to 258006

    Re: Rebuilding ehshell.exe with ilasm.exe

    Pete, you gave me a second hope with this issue. But, alas, it still did not work. The strong name validation error still comes up, whether I use a newly signed exe, or the old exe with the key removed. It just doesn't like it.

    Seems futile. Quite a shame, because I could have done some nice stuff with this.

    Thanks for the help, though. I appreciate the new ideas.
View as RSS news feed in XML
About TGB | Advertise | Link To Us | Donate | Terms Of Use | Privacy Policy
© 2003-2007 The Green Button, Inc. - All Rights Reserved