CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2011
    Posts
    4

    Add menu to closed-source program

    Hi

    I'd like to add some functionality to a program for which I only have the binaries. It's a C++ program, probably MFC.

    My question: is there some reasonably easy way to do this - that is, without the kind of code injection techniques commonly used for malicious code? I was thinking of a wrapper program that launches the target program and then modifies its menu and registers an event handler. Is this possible?

    Thanks

    Erik

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Add menu to closed-source program

    Quote Originally Posted by erikh3 View Post
    Hi

    I'd like to add some functionality to a program for which I only have the binaries. It's a C++ program, probably MFC.
    How do you know it's C++ if you only have the binaries?

    Secondly, if it's copyrighted software, you better check with with the authors as to whether you're legally allowed to change their program.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Dec 2011
    Posts
    4

    Re: Add menu to closed-source program

    Well, I know it's C++ because of occasional error messages about a failed assertion in some .cpp module (and from what I've read in forums about this app).

    Haven't read the license agreement, but I'm trying to find a way to avoid modifying the binaries. Incidentally, I know there's at least one commercial product out there that also adds a menu to the app - the guys who made that plug-in do not seem to have run into legal trouble.

    BTW is there a commonly used plug-in framework (similar to java's JPF) for C++ apps, and if there is, how can I see if they used it?

    Erik

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Add menu to closed-source program

    Quote Originally Posted by erikh3 View Post
    Well, I know it's C++ because of occasional error messages about a failed assertion in some .cpp module (and from what I've read in forums about this app).
    A release version of an application would not or should not have displayed assertions.

    Are you running a debug version of the application, i.e., you need the debug runtime libraries for this program to run (also stated, you need Visual Studio installed for this app to run)?

    If you received a debug build, you do realize that you cannot legally distribute that app (even after you potentially change it) to anyone that doesn't have Visual Studio installed? You need a release build version given to you if your goal is to distribute it to others who are not owners of Visual Studio.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,241

    Re: Add menu to closed-source program

    Quote Originally Posted by erikh3 View Post
    Haven't read the license agreement, but I'm trying to find a way to avoid modifying the binaries.
    Then read it! Almost sure it dosn't give you permission for modifying the binaries.

    Quote Originally Posted by erikh3 View Post
    Incidentally, I know there's at least one commercial product out there that also adds a menu to the app - the guys who made that plug-in do not seem to have run into legal trouble.
    Yes but those applications offer themselves support for plugins, i.e. search and recognize plugin modules (which can be COM components or simple DLLs), load them, and so on.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  6. #6
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Add menu to closed-source program

    BTW is there a commonly used plug-in framework (similar to java's JPF) for C++ apps,
    Never heard of such.

    and if there is, how can I see if they used it?
    Normally this must be properly documented in product.

    Well, I know it's C++ because of occasional error messages about a failed assertion in some .cpp module (and from what I've read in forums about this app).
    If there is some plug-in framework in use, the message could be from some C++ plugin, and main app may be done in any other language.
    Best regards,
    Igor

  7. #7
    Join Date
    Dec 2011
    Posts
    4

    Re: Add menu to closed-source program

    Thanks for your input, guys. It looks like this is going to be too difficult for my limited C++ skills (I'm primarily a Java developer). I'm pretty sure that this app is using some kind of plug-in framework but it's not documented (the people that wrote the commercial plug-in used to work for the company that makes the app). If there's no trick to do this without hacking into the binaries, I give up.

  8. #8
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: Add menu to closed-source program

    Your request is very ambiguous.
    What kind of functionality are you trying to add? Is it related to that program’s data? Then, most likely, it’s not possible without documentation.
    But if it is, for example, some “windows”-only stuff (like, for example, skinning, or positioning) – then it’s doable.
    If there IS some plug-in framework, and if you have a working plug-in, you can examine its interfaces with a tool like Depends. If you are lucky and the interface is obvious and simple – you might be able to create another plug-in.
    If you would name that software – someone here might have more information.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  9. #9
    Join Date
    Dec 2011
    Posts
    4

    Re: Add menu to closed-source program

    The program is pside.exe, which is the IDE for Oracle's PeopleSoft ERP suite. It sits in a directory with about 30 other .exe files - plus about 700 DLLs (not kidding). I've started it in a debugger and quickly concluded that it's pure DLL hell (why doesn't everybody just code in Java?). None of the DLLs is easy to identify as a plug-in.

    I never had the ambition to dive deep into how the IDE works - all I'd need for my functionality is the name of the project the user is working on, which would be relatively easy to find because it is displayed in a status bar; the other data I need can be retrieved from the database.

    Anyway, it looks I don't have the skills (or time) to pull it off. Thanks again.

  10. #10
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Add menu to closed-source program

    why doesn't everybody just code in Java?
    You mean, change cozy and homey dll hell to Java hell? No, thanks.
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured