[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1099
  • Last Modified:

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.

  • 2
1 Solution
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 .


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now