VB6.0 application process does not Exit under Windows 7


  1. Posts : 3
    Windows 7 Ultimate x32
       #1

    VB6.0 application process does not Exit under Windows 7


    My VB6.0 application process does not Exit under Win 7 but it exits properly on Win XP. After exiting the application process VB6 exe remains running in Task Manager. So every time I need to manually end that process. Is there any way to release all resources held by VB6.0 exe & VC++ dlls on Win 7 OS through VB6/C++ code.
      My Computer


  2. Posts : 1,036
    Winbdows 7 ultimate x64 | Ubuntu 12.04 x64 LTS
       #2

    One way i can think of is to create a batch file and pin it to taskbar. Save your work and click the pinned item to terminate it.
    Code:
    taskkill /im /f <insertprocessnamehere>
    You can also use Process Explorer to see, after closing normally, which files (dll's etc) remain loaded by the program's process to identify the conflicting ones.
    http://technet.microsoft.com/en-us/s...rnals/bb896653
    Last edited by EzioAuditore; 24 Apr 2012 at 02:20.
      My Computer


  3. Posts : 3
    Windows 7 Ultimate x32
    Thread Starter
       #3

    Thanks Ezio..Earlier I used taskkill option..but as per code review comments-"do not use taskkill option" so I am exploring other options to release the resources.

    I think Dlls are not unloading properly & holding the resources thatswhy Exe is running in background. If I tried to explicitly unload Dll, then application hangs & do not close.

    your link displays
    Error. Page cannot be displayed. Please contact your service provider for more details. (6)
      My Computer


  4. Posts : 1,036
    Winbdows 7 ultimate x64 | Ubuntu 12.04 x64 LTS
       #4

    Oh sorry, I edited the link in my previous post. Check now.
      My Computer


  5. Posts : 3
    Windows 7 Ultimate x32
    Thread Starter
       #5

    Solved!!


    Thanks Ezio..first I used Process Explorer and I found some of the Dlls were not released. so to localise the problem I used Dependency Walker tool. I observed that application control stuck at one of the Dll and was not moving ahead and releasing other resources.

    Finally, I sent a call to that Dll to release the resources and it worked. I dont know exactly what's difference in Win 7 and Win XP at Dll level where Win 7 was not releasing the Handles of the Dll which Win Xp does.
      My Computer


  6. Posts : 1,036
    Winbdows 7 ultimate x64 | Ubuntu 12.04 x64 LTS
       #6

    Sachin100 said:
    Thanks Ezio..first I used Process Explorer and I found some of the Dlls were not released. so to localise the problem I used Dependency Walker tool. I observed that application control stuck at one of the Dll and was not moving ahead and releasing other resources.

    Finally, I sent a call to that Dll to release the resources and it worked. I dont know exactly what's difference in Win 7 and Win XP at Dll level where Win 7 was not releasing the Handles of the Dll which Win Xp does.
    Thats a great news. Glad its solved.
    Windows has come a long way down from XP to 7 both in features and working. If you notice any program behaving erratically, try running it in Compatibility Mode.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:48.
Find Us