Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to convert OCX file into C#

How to convert OCX file into C#

Scheduled Pinned Locked Moved C#
csharpc++tutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dwark106
    wrote on last edited by
    #1

    Hi Everyone, I have a project which was written long time back. Now we are in position to convert into C# source code but we found that we donot have any source code. I need two favors from you. 1. How to convert the ocx file into C# source code without having the source code 2. How to convert VC++ source code into C# soruce code. Thanks in advance

    CPalliniC OriginalGriffO D 3 Replies Last reply
    0
    • D dwark106

      Hi Everyone, I have a project which was written long time back. Now we are in position to convert into C# source code but we found that we donot have any source code. I need two favors from you. 1. How to convert the ocx file into C# source code without having the source code 2. How to convert VC++ source code into C# soruce code. Thanks in advance

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      dwark106 wrote:

      1. How to convert the ocx file into C# source code without having the source code

      Why? If your COM component works well, just use it in a C# application (via COM interop). If you're stuck with the 'conversion' requirement, I suppose the easier solution is implementing from scratch the COM object functionality (i.e. 'the black box' way) in C# (in other words, I believe reverse engineering is not a good solution of your problem).

      dwark106 wrote:

      2. How to convert VC++ source code into C# soruce code.

      For a C++ and C# expert the task should be fairly straightforward (if you were an expert of both languages then you probably wouldn't do or ask about...). :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      D 1 Reply Last reply
      0
      • D dwark106

        Hi Everyone, I have a project which was written long time back. Now we are in position to convert into C# source code but we found that we donot have any source code. I need two favors from you. 1. How to convert the ocx file into C# source code without having the source code 2. How to convert VC++ source code into C# soruce code. Thanks in advance

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3
        1. Learn assembler. Disassemble OCX. Spend lots of time working out what the heck is going on. Code it in c# 2) Learn C++. Learn C#. Translate. To be honest, if you are lacking the source code for the OCX, then the best thing you can do is re-write it from the original specification. Or (more likely) write the spec from the OCX behaviour, and then rewrite the OCX. Good luck - you may need it...

        No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • CPalliniC CPallini

          dwark106 wrote:

          1. How to convert the ocx file into C# source code without having the source code

          Why? If your COM component works well, just use it in a C# application (via COM interop). If you're stuck with the 'conversion' requirement, I suppose the easier solution is implementing from scratch the COM object functionality (i.e. 'the black box' way) in C# (in other words, I believe reverse engineering is not a good solution of your problem).

          dwark106 wrote:

          2. How to convert VC++ source code into C# soruce code.

          For a C++ and C# expert the task should be fairly straightforward (if you were an expert of both languages then you probably wouldn't do or ask about...). :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          D Offline
          D Offline
          dwark106
          wrote on last edited by
          #4

          Hi Pallini, Thanks for your response. 1. Actually I donot know what are the functions are being used by this application(ocx). I am also thinking to write from the scratch, but I do not have source code, so that I can chop the function that is not needed. 2. I was looking the easier way to convert the application. Anyways I will take your suggestions.

          1 Reply Last reply
          0
          • D dwark106

            Hi Everyone, I have a project which was written long time back. Now we are in position to convert into C# source code but we found that we donot have any source code. I need two favors from you. 1. How to convert the ocx file into C# source code without having the source code 2. How to convert VC++ source code into C# soruce code. Thanks in advance

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            There are no conversion tools and nothing that is going to generate any kind of C# code for you. You have no choice but to study the existing OCX control and redesign and recode the control by hand in C#, or any other language for that matter.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups