Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

What is Microsoft's Visual Basic 6 Support Strategy?

Download

Right click “Save as…”

  • High Quality WMV (PC)
  • MP3 (Audio only)
  • MP4 (iPhone, Android)
  • Mid Quality WMV (Lo-band, Mobile)
  • WMV (WMV Video)

Paul Yuknewicz, Lead Program Manager on the Visual Studio team, discusses Visual Basic 6 runtime and IDE support options as well as proven techniques, tools and best practices for interoperability and gradual, phased migration to .NET.

Read the Official Support Statement on Windows 7, Windows Vista, and Windows XP

Visit the Visual Basic 6 Migration page on the Visual Basic 6 Resource Center for tools and information on how to plan and execute a gradual, phased migration to .NET.

Tags:

Follow the Discussion

  • Andrew Richardswindev Andrew Richards

    It's great to see a statement come out for Win7.  Great (<groan>) to see VB6 last another decade. Smiley

  • Ron GarrettRegnwald Regnwald

    Paul, You made a gallant plea for migrants, but did you sell? I doubt it. You have the same battle as MS has with XP and Vista. Doubts.

     

    How can you possibly encourage me to drop VB5.0 and migrate to VB.NET when VB.NET cannot do - I repeat CANNOT DO - what I can easily do on VB5. Why should I be so foolish as spend $1000 or more for VS2010 if it DOES NOT DO THE JOBS I need to do, and can do now.

     

    For example, my most-used VB5.0 program processes astronomical images up to 80Mb in size, reducing image noise and reducing tonal range in stacked images, as well as doing metric and statistical work on the images. To achieve that, I use pointers to read bitmap data as both one and two dimensional arrays. I will NOT use lockbits for this purpose - at 72 yoa I cannot afford to wait for several GB of pixels to be moved back and forth between managed and unmanaged memory. And having left get and put long ago I have no desire to type those again. Dot NET may have advantages but it takes TIME coding,TIME compiling and ?TIME running. In addition, I call assembler routines which obviously use memory locations. VB.NET and C# cannot cope.

     

    If you ARE really desperate to get VB6 (and us real sceptics of VB5 and earlier) over to VB.NET you MUST maintain the coding tools of VB6. All your pleas MUST fall on deaf ears otherwise. You must see that. How cam interop rework code, that uses memory moves, to a platform that does not recognise them.

     

    I don't want the dog's dinner of pointer rubbish that litters C and C++. I am in the desperate situation of going ther. I hate it so far. I know plenty of C and C++ programmers who don't want it either! Just give me back:

     

    1)    VARPTR on any damn thing I want. Don't worry about the GC - you can restrict to proc to GLOBAL or STATIC which are outside its range. But give them back to me.

     

    2)   Clean methods to put them wherever I want to - pointers to array structures and data, bitmaps and bitmap data, and any user defined data structure.

     

    And please don't tell me its too hard. DotNET is doing it ALL THE TIME. Then you may be in time to sell me VS2013!

     

    But thanks for at least keeping the tenor of VB alive. As I said somewhere else, VB is a natural language worth far more than its image in some communities. I now spend a lot of time talking to my computer (Dragon Naturally Speaking). I don't let it talk back. It might win!! But even computer programming could move that way. Then I hope the conversation would be like that between Dillon and Andromeda than between the ?Arkona guru and his computer.

     

    On a related matter, what in hell is MS doing pushing yet another new general purpose language. We have enough. Its getting bad enough with image formats. Absorb the F# team and make VB more powerful that it was before .NET (and, OK, even C# can benefit too, though heaven knows why).

     

    Email me direct if you need to

     

    Regards

     

    Ron

     

  • You can write a few shim methods for that especific duties with C# (it can handle pointer arithmetics)  or even C++ .NET if you need  more hardcore stuff (which I doubt you do with VB5/6), while reusing the rest of the code in VB.NET seamlessly.  Also taking a look to the System.Runtime.Marshalling, class is very usesful when dealing with allocations you metion or memory allocated somewhere else.

     

    Perhaps a if you can give I little example of the things you intend to do, I can help you more (although experienced, not that I am a guru by any strech of the imagination)

     

    Also I think that you are more affected by the fact that .net framework is type safe, and that VB inherited some of that on its pass to the framework.  And thats a good thing.  The fact that you have stabilized your product doesn't means that type unsafety is a good thing.

  • I think you can do that sort of thing in C# unsafe code; you might be able to code just the portions that need it in C# or native C++ and the rest in VB.NET.  You could be right though that in your particular situation you might be best off just sticking to classic VB; my impression though is that your situation is rare (i.e. most VB programs do not make extensive use of pointer trickery etc.)

     

    and guys, please do not absorb the F# team.   Scared

     

     

  • Jeff KlawiterJeff Klawiter try { something; } fault { nothing; } catch { everything; } finally { succeed; }

    Yes with C# unsafe you can achieve all the pointery goodness you can do in VB and C/C++. Hell you can even execute Assembly code in C# when compiled in unsafe. PTR's, Marshalling and other structures existin .NET/C# to support this type of situation. It's one of the things I love about C# the most, it's versatility. It can be a modern garbage collected language with LINQ, Delegates and Parallel extensions thrown in or you can write it like cleaner C++ and do some crazy native type stuff.

  • +1000

     

    Absolutely, love C# for the same reason.

  • Bent Rasmussenexoteric stuck in a loop, for a while

    Sounds like a failure to understand* the idea behind .Net, which is reuse of libraries written in different languages and through a common intermediate language. There no longer is any reason to have one glorified language (although the idea still lurks).  (* Not on your part, contextfree)

  • Watson Fru Nwatsonfru Me And Me Alone!

    I have always wondered this too. I hope people start to think before they do things!

     

    From the Pregnancy Miracle guy

  • Ron GarrettRegnwald Regnwald

    G'day Paul.

    Well, you did ask what I want to do!

     

    I have a REAL LARGE BITMAP defined GLOBAL in VB -- the image -- BM1 (20 Mp; ie 80Mb as ARGB).

    C/C++ returns nothing -- the job is done in situ. On return to VB the following should be true:

    The BM1.pvBits is to be obtained and transferred to a C/C++ routine. In C/C++ two SAFEARRAY structures SA1 and SA2 are defined with GLOBAL scope. SA1 matches BM1 as a 1D array. SA2 matches BM1 as a 2D array. The SAFEARRAY structures pvData are both pointed to the BM1.pvBits data. Two small arrays of bytes are defined GLOBAL -- Pic1() and Pic2(). Pointers to addresses of Pic1() Pic2() SA1 and SA2 are obtained. The SA1 pointer is copied into the Pic1() pointer and the SA2 pointer is copied into the Pic2() pointer.

     

    The Pic1 no longer points to its small array, but to the BM1 data

     

     

     Assembler accesses the BM1.pvBits

    The BM1 data is now accessed by Pic1() as a 1D array The Pic2 no longer points to its small array, but to the BM1 data The BM1 data is now accessed by Pic2() as a 2D array

     

     The SAFEARRAYs never go out of scope and are immune to GC so BM1 Pic1() and Pic2() are safe

     

            

     

     I would be happy to stay with VB 5.0 were it not that the camera control SDK needs VB.NET  Is the SAFEARRAY structure still describing arrays in VB.NET What pointer type problems do I have in C/C++? Which C/C++ dialect should I use -- what headers. How does .NET deal with pointers to foreign objects in GLOBAL (unmanaged) memory How does native C deal with .NET  C++ .NET will not build 2D arrays in GLOBAL scope -- in this case does it know it has?

     

    A fair number of issues for someone who hasn't needed to use C for nearly 20 years! I have a lot to learn.

     

    But seriously, there is ONLY ONE WAY to get VB6ers onto VB.NET. You must be able to say TRUTHFULLY -- "VB.NET WILL DO EVERYTHING THAT VB6 DOES - AND MORE." But even then you have a clumsy technology which I suspect many C/C++ guys don't use.

     

    Until you can say that,, you are largely wasting your time. Trust requires a proven track record of backward compatibility. A workaround is a pain at best and it means YOU FAILED. You ARE behind schedule with this and the VS bottom line suffers accordingly! But what did Luca PROMISE me?

     

    Regards, Ron

     

     

     

     

     

     C++ .NET it seems, does not redefine global arrays and only defines them outside of routines?

    What happens to the Pic1() and Pic2() data references to data? -- its out of reach of the GC but small -- or should they be defined empty Does VB.NET give me BM1.pvBits -- VB 5.0 does ALL of this for me. GIVE ME IT ALL BACK.

    This will have to be done for each image as the BM1.pvBits will occupy different memory -- I KNOW, CLEAN UP NEEDED!!!

     

    WORRIES and DOUBTS:

  • Ron GarrettRegnwald Regnwald

    Paul,

     

    That post got badly chopped in the posting. Don't know why. Try again!

     

    G'day Paul.

    Well, you did ask what I want to do!

     

    I have a REAL LARGE BITMAP defined GLOBAL in VB -- the image -- BM1 (20 Mp; ie 80Mb as ARGB). The BM1.pvBits is to be obtained and transferred to a C/C++ routine. In C/C++ two SAFEARRAY structures SA1 and SA2 are defined with GLOBAL scope. SA1 matches BM1 as a 1D array. SA2 matches BM1 as a 2D array. The SAFEARRAY structures pvData are both pointed to the BM1.pvBits data. Two small arrays of bytes are defined GLOBAL -- Pic1() and Pic2(). Pointers to addresses of Pic1() Pic2() SA1 and SA2 are obtained. The SA1 pointer is copied into the Pic1() pointer and the SA2 pointer is copied into the Pic2() pointer.

     

    C/C++ returns nothing -- the job is done in situ.

    On return to VB the following should be true:

    The Pic1 no longer points to its small array, but to the BM1 data

    The BM1 data is now accessed by Pic1() as a 1D array

    The Pic2 no longer points to its small array, but to the BM1 data

    The BM1 data is now accessed by Pic2() as a 2D array

    Assembler accesses the BM1.pvBits

    The SAFEARRAYs never go out of scope, are immune to GC so BM1 Pic1() and Pic2() are safe

     

    WORRIES and DOUBTS:

    What happens to the Pic1() and Pic2() data references to data?

    Iits out of reach of the GC but small -- or should they be empty

    Does VB.NET give me BM1.pvBits -- VB 5.0 does ALL of this for me. GIVE ME IT BACK

    Is the SAFEARRAY structure still describing arrays in VB.NET

    What pointer type problems do I have in C/C++?

    Which C/C++ dialect should I use -- what headers.

    How does .NET deal with pointers to foreign objects in GLOBAL (unmanaged) memory

    How does native C deal with .NET

    C++ .NET will not build 2D arrays in GLOBAL scope -- in this case does it know it has?

    C++ .NET it seems, does not redefine global arrays and only defines them outside routines?

    This will have to be done for each image as the BM1.pvBits will occupy different memory -- I KNOW, CLEAN UP NEEDED!!

     

    That's a lot to lear for someone who has't needed to use C for nearly 20 years. But seriously, there is ONLY ONE WAY to get VB6ers onto VB.NET. You must be able to say TRUTHFULLY -- "VB.NET WILL DO EVERYTHING THAT VB6 DOES - AND MORE." But even then you have a clumsy technology which I suspect many C/C++ guys won't use. I would be happy to just stay with VB 5.0 were it not that a camera manufacturer's SDK requires VB.NET.

     

    Until you can say that you are largely wasting your time. Trust requires a proven track record of backward compatibility. A workaround is a pain at best and it means YOU FAILED. You ARE behind schedule with this and the VS bottom line suffers accordingly! But hope is eternal. What did Luca PROMISE me. If he does that, and catches up with the past, you may well get me caught in 2013.

     

    Regards, Ron

  • I've to say I haven't tried them but one of the .NET GPGPU libs might be of interest if the you're looking for potential speed up without writing any C..

     

    http://research.microsoft.com/en-us/projects/Accelerator/  << research project - i believe there are some better supported alternatives but I forget the names right now.

     

    With the new Radeon 5xxx series that from demos so far looks to be way faster than currently available cards, with suitable data size (fit into gpu memory) you could be looking at massive perf increases for this sort of application over say doing same thing with app compiled with Intel C++ compiler and latest 8 core.

  • Ron GarrettRegnwald Regnwald

    Thanks, Androidi,

    I'll bear the card matter in mind when I upgrade, but I cannot impose that on my clients. My * with MS is that they did not maintain backward compatibility and that has NOTHING to do with .NET issues. It seems to be too much waste paper wrappers causing a mess in which the real contents get lost.

    I'll take on the accellerators though.

    Regards

    Ron

  • sdk jfherfljugr djkh dybhd chf fhj ?

  • WNDR3700WNDR3700

    Great post. I really want to try VB. I'll try to use this.

  • Classification of Amino AcidsClassificat​ion of Amino Acids

    Thganks for this great information , read this article if you want to know some information about classification of amino acids

  • BlenderBlender

    I have always wondered this too. I hope people start to think before they do things!
    Bilader, Pregnancy Miracle

  • BlenderBlender

    I have always wondered this too. I hope people start to think before they do things! Pro Flight Simulator

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.