Editing a compiled OCX

I need to edit a variable within an ocx I have compiled. The reason I can't just recompile is because the source containing the version of this ocx was lost on my backup drive.

So are there any utilities that would allow me to edit the ocx. I'm also trying to see if there is anything that will actually allow me to view the code within the ocx.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, OCXen contain compiled code, so the process will not be trivial at all, unless you know how to work with a disassembler and a hex editor.

If you google for "OCX VB disassemble" ( http://www.google.com/search?q=OCX+VB+disassemble ), you'll get a number of tools which pretend to be able to disassemble an OCX. Once you know how where the value of the variable is stored, you can try to patch it with a hex editor.

Good luck.
ShroderAuthor Commented:
Can you give me a link to a good hex editor?
I'm using the hex editor which comes with my text editor (UltraEdit).

Here's a list of hex editors, some of them being open source:
http://lists.gpick.com/pages/Hex_Editors.htm or http://www.thefreecountry.com/programming/disassemblers.shtml

Frhed appears to be a good choice, but I don't really know: http://www.kibria.de/frhed.html 

Note that if you change the code, you probably need to change the checksum in the header of the file. There are some utilities to do this:
http://www.safesite.com/product.php%5Bid%5D66750%5Bcid%5D233%5BSiteID%5Ddigibuy or
http://www.softpedia.com/get/Programming/File-Editors/StudPE.shtml .


Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.