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. The Lounge
  3. Need a Utility

Need a Utility

Scheduled Pinned Locked Moved The Lounge
toolsquestion
18 Posts 11 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.
  • R RedZenBird

    I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? Just trying to keep the forces of entropy at bay

    R Offline
    R Offline
    Robert Little
    wrote on last edited by
    #2

    Grey matter and 10 fingers. ;) --

    "The money power of the country will endeavor to prolong its rule by preying upon the prejudices of the people until all wealth is concentrated in a few hands and the Republic destroyed." -- Abraham Lincoln

    J 1 Reply Last reply
    0
    • R Robert Little

      Grey matter and 10 fingers. ;) --

      "The money power of the country will endeavor to prolong its rule by preying upon the prejudices of the people until all wealth is concentrated in a few hands and the Republic destroyed." -- Abraham Lincoln

      J Offline
      J Offline
      Jon Newman
      wrote on last edited by
      #3

      You forgot coffee....


      "Póg mo thóin!"
      "One of the most important things you learn !rom the internet is that there is no ‘them’ out there. It’s just an awful lot of ‘us’."
      -Douglas Adams
      Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]

      1 Reply Last reply
      0
      • R RedZenBird

        I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? Just trying to keep the forces of entropy at bay

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #4

        IMHO, you don't want to do this. As bad as junk VB code can be, i find it hard to believe it will translate into better C code. Things which are Evil™ but run-of-the mill in VB are Pure Darkness Itself® in C. Either link it in as a COM object, or re-write it.

        Shog9

        So much he don't understand, Just might never make it to a man...

        1 Reply Last reply
        0
        • R RedZenBird

          I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? Just trying to keep the forces of entropy at bay

          J Offline
          J Offline
          John Fisher
          wrote on last edited by
          #5

          You could migrate/upgrade it to VB.NET code, then using the CodeDOM, switch it to C#. Also, once it's accessible through .NET, you could use it with Managed C++ as well... And if it's worth all this, that VB code must be really nasty. John
          "We want to be alone when we hear too many words and we feel alone when it has been a while since anyone has spoken to us." Paul David Tripp -- War of Words

          D G 2 Replies Last reply
          0
          • R RedZenBird

            I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? Just trying to keep the forces of entropy at bay

            A Offline
            A Offline
            Anna Jayne Metcalfe
            wrote on last edited by
            #6

            1. Reverse engineer it using a good UML tool. 2. Have a good laugh 3. Start again on a blank sheet of paper :laugh: Alternatively, document what it does and why (in detail), review it and design something that actually addresses the problem achieves the original app was meant to solve. Anna :rose: Homepage | My life in tears "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work. Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In

            C 1 Reply Last reply
            0
            • A Anna Jayne Metcalfe

              1. Reverse engineer it using a good UML tool. 2. Have a good laugh 3. Start again on a blank sheet of paper :laugh: Alternatively, document what it does and why (in detail), review it and design something that actually addresses the problem achieves the original app was meant to solve. Anna :rose: Homepage | My life in tears "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work. Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In

              C Offline
              C Offline
              Chris Maunder
              wrote on last edited by
              #7

              Anna-Jayne Metcalfe wrote: 1. Reverse engineer it using a good UML tool. 2. Have a good laugh :D cheers, Chris Maunder

              B A 2 Replies Last reply
              0
              • C Chris Maunder

                Anna-Jayne Metcalfe wrote: 1. Reverse engineer it using a good UML tool. 2. Have a good laugh :D cheers, Chris Maunder

                B Offline
                B Offline
                basementman
                wrote on last edited by
                #8

                Or a good cry....

                1 Reply Last reply
                0
                • R RedZenBird

                  I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? Just trying to keep the forces of entropy at bay

                  D Offline
                  D Offline
                  Daniel Turini
                  wrote on last edited by
                  #9

                  RedZenBird wrote: I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? No easy way, if you don't want to read vb. You could use the upgrade wizard to port it to VB.NET and, with a few modifications (if the code is too junky, with huge modifications), use my latest article[^] to port it to C#. Clean it up, and have fun. Since I love C#, I would never do this last step, unless you really have lots of Interop code: now, you can easily port to managed C++ by adding tons of *, -> and String::Concat. Some smart macros combined with regular expressions could really do this. Or rewrite everything. Kant wrote: Actually she replied back to me "You shouldn't fix the bug. You should kill it"

                  1 Reply Last reply
                  0
                  • J John Fisher

                    You could migrate/upgrade it to VB.NET code, then using the CodeDOM, switch it to C#. Also, once it's accessible through .NET, you could use it with Managed C++ as well... And if it's worth all this, that VB code must be really nasty. John
                    "We want to be alone when we hear too many words and we feel alone when it has been a while since anyone has spoken to us." Paul David Tripp -- War of Words

                    D Offline
                    D Offline
                    Daniel Turini
                    wrote on last edited by
                    #10

                    John Fisher wrote: You could migrate/upgrade it to VB.NET code, then using the CodeDOM, switch it to C#. No, you can't use CodeDOM to convert VB.NET code to C#. Unfortunately. Kant wrote: Actually she replied back to me "You shouldn't fix the bug. You should kill it"

                    J 1 Reply Last reply
                    0
                    • C Chris Maunder

                      Anna-Jayne Metcalfe wrote: 1. Reverse engineer it using a good UML tool. 2. Have a good laugh :D cheers, Chris Maunder

                      A Offline
                      A Offline
                      Anna Jayne Metcalfe
                      wrote on last edited by
                      #11

                      I knew you'd like that one! ;) Anna :rose: Homepage | My life in tears "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work. Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In

                      1 Reply Last reply
                      0
                      • R RedZenBird

                        I need to convert from VB junk (background: don't read vb, and don't want to) to C code. Anyone know of any utilities that do this? Just trying to keep the forces of entropy at bay

                        S Offline
                        S Offline
                        Stuart Dootson
                        wrote on last edited by
                        #12

                        Well, yes, I DO know of such a utility - it's on either the MSDN or Microsoft websites (I don't remember where :-() and it's called VB2C or something like that - a link was posted on CP about a month ago. I'll try and find it tomorrow at work, as I've got the binaries there... Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'

                        R 1 Reply Last reply
                        0
                        • D Daniel Turini

                          John Fisher wrote: You could migrate/upgrade it to VB.NET code, then using the CodeDOM, switch it to C#. No, you can't use CodeDOM to convert VB.NET code to C#. Unfortunately. Kant wrote: Actually she replied back to me "You shouldn't fix the bug. You should kill it"

                          J Offline
                          J Offline
                          John Fisher
                          wrote on last edited by
                          #13

                          I knew about those lovely extra dlls that VB.NET uses, but why aren't they accessible from C#? Or is there something else getting in the way. BTW, I was mostly joking about this. :) John
                          "We want to be alone when we hear too many words and we feel alone when it has been a while since anyone has spoken to us." Paul David Tripp -- War of Words

                          D 1 Reply Last reply
                          0
                          • J John Fisher

                            You could migrate/upgrade it to VB.NET code, then using the CodeDOM, switch it to C#. Also, once it's accessible through .NET, you could use it with Managed C++ as well... And if it's worth all this, that VB code must be really nasty. John
                            "We want to be alone when we hear too many words and we feel alone when it has been a while since anyone has spoken to us." Paul David Tripp -- War of Words

                            G Offline
                            G Offline
                            Giles
                            wrote on last edited by
                            #14

                            John Fisher wrote: You could migrate/upgrade it to VB.NET code, then using the CodeDOM, switch it to C :laugh::laugh: The VB conversion wizard, hmm at its best is not very good, but to then move it to C#.


                            "Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table. Shameless Plug - Distributed Database Transactions in .NET using COM+

                            1 Reply Last reply
                            0
                            • J John Fisher

                              I knew about those lovely extra dlls that VB.NET uses, but why aren't they accessible from C#? Or is there something else getting in the way. BTW, I was mostly joking about this. :) John
                              "We want to be alone when we hear too many words and we feel alone when it has been a while since anyone has spoken to us." Paul David Tripp -- War of Words

                              D Offline
                              D Offline
                              Daniel Turini
                              wrote on last edited by
                              #15

                              John Fisher wrote: I knew about those lovely extra dlls that VB.NET uses, but why aren't they accessible from C#? Or is there something else getting in the way. They are not the problem; it's on the CodeDOM, because the .NET Framework only provides classes to generate code from a CodeDOM tree, but not parser classes to generate a CodeDOM tree from code. Kant wrote: Actually she replied back to me "You shouldn't fix the bug. You should kill it"

                              1 Reply Last reply
                              0
                              • S Stuart Dootson

                                Well, yes, I DO know of such a utility - it's on either the MSDN or Microsoft websites (I don't remember where :-() and it's called VB2C or something like that - a link was posted on CP about a month ago. I'll try and find it tomorrow at work, as I've got the binaries there... Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'

                                R Offline
                                R Offline
                                RedZenBird
                                wrote on last edited by
                                #16

                                cool. thanx Just trying to keep the forces of entropy at bay

                                S 1 Reply Last reply
                                0
                                • R RedZenBird

                                  cool. thanx Just trying to keep the forces of entropy at bay

                                  S Offline
                                  S Offline
                                  Stuart Dootson
                                  wrote on last edited by
                                  #17

                                  Here's the link[^]!!! There ARE limitations to the conversion process - don't expect any big bits of code to convert straight through... Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'

                                  R 1 Reply Last reply
                                  0
                                  • S Stuart Dootson

                                    Here's the link[^]!!! There ARE limitations to the conversion process - don't expect any big bits of code to convert straight through... Stuart Dootson 'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'

                                    R Offline
                                    R Offline
                                    RedZenBird
                                    wrote on last edited by
                                    #18

                                    thank you. i'll give this a whirl.:-D Just trying to keep the forces of entropy at bay

                                    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