Results 1 to 4 of 4

Thread: VB6 Shell() Function doesn't work in 64-bit Windows

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    2

    Question VB6 Shell() Function doesn't work in 64-bit Windows

    Hi,

    My firm has a number of legacy processes and applications, written in Visual Basic 6, that use the Shell() function to execute various external programs like BCP.EXE. We are currently in the process of migrating these programs from a Windows NT environment to a Windows 2003 x64 environment. I have found that the Shell() function no longer works in the 64-bit environment. I have also tried using the CreateProcessA API and this doesn't appear to work either. Does anyone know of a method of executing external 32-bit programs from a VB6 program running in a 64-bit environment? Also, does anyone know of any other potential pitfalls with migrating VB6 applications to a 64-bit operating system?

    Any help that could be provided would be much appreciated!

    JCB

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: VB6 Shell() Function doesn't work in 64-bit Windows

    does the program actually run on that operating system?
    can you create a shortcut to it?
    possibly you can shellexecute the shortcut
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    2

    Re: VB6 Shell() Function doesn't work in 64-bit Windows

    Yes, the program runs in the Windows 2003 x64 Standard Edition operating system. The program is a scheduled process that runs on the Win2k3 x64 machine and calls other 32-bit executables that also reside on that machine. Unfortunately, running it from another 32-bit machine is not an option.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB6 Shell() Function doesn't work in 64-bit Windows

    Instead of Shell have you tried using the ShellExecute API?

    What are the possibilities of rewriting these legacy apps in VB.NET?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width