471,084 Members | 1,046 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,084 software developers and data experts.

app running as os service?

I received one additional piece of information which may help
(doesn't help me, but maybe it will help someone help me): someone
suggested that the application, or a part of it, begins running as a
service of the operating system. If this sounds plausible, where does
the problem likely originate? Is it some part of the program code, or
some program code that is not present (the app. has nothing in it that
attempts to identify its environment), or maybe something in the
project properties?

Thanks for any info.

Here is the relevant part of my original post:
I have a vb6 application which may have been started on Windows95
using an earlier vb version, definitely updated on Windows98(inc. SP
5). It is deployed on a machine running WindowsXP, and in this
environment the user can close the program, yet it (or some remnant of
it) remains listed in the Task Manager. This doesn't happen every time
user closes the program, and without looking at Task Manager it
appears the program is completely gone--no minimized windows in the
task bar, no error or warning messages.
Jul 17 '05 #1
2 2129
Thank you! I was all set to check this because I recalled a definite
lack of cleaning up in the program overall, but then "someone" (who
knows about Windows XP, about which I am ignorant) put me on the track
of something that sounded less tedious and more interesting...a
pitfall to be sure.
er*****@nowhere.com (J French) wrote in message news:<3f***************@news.btclick.com>...
On 7 Aug 2003 06:37:05 -0700, ka**@curio.com (Kate) wrote:
I received one additional piece of information which may help
(doesn't help me, but maybe it will help someone help me):

Someone
suggested that the application, or a part of it, begins running as a
service of the operating system.


'Someone' needs a remedial course

Your App is not unloading itself properly
- maybe an 'orphan' Form
- perhaps a Class ... or a UserControl
- Timers can sometimes be a problem

Track the Initialize and Terminate events of *everything*

Chances are that you have a silly little hidden Form
- but it can be nastier ....

Explicitly Kill everything you Create
- and check that it dies

f this sounds plausible, where does
the problem likely originate? Is it some part of the program code, or
some program code that is not present (the app. has nothing in it that
attempts to identify its environment), or maybe something in the
project properties?

Thanks for any info.

Here is the relevant part of my original post:
I have a vb6 application which may have been started on Windows95
using an earlier vb version, definitely updated on Windows98(inc. SP
5). It is deployed on a machine running WindowsXP, and in this
environment the user can close the program, yet it (or some remnant of
it) remains listed in the Task Manager. This doesn't happen every time
user closes the program, and without looking at Task Manager it
appears the program is completely gone--no minimized windows in the
task bar, no error or warning messages.

Jul 17 '05 #2
On 7 Aug 2003 16:01:04 -0700, ka**@curio.com (Kate) wrote:
Thank you! I was all set to check this because I recalled a definite
lack of cleaning up in the program overall, but then "someone" (who
knows about Windows XP, about which I am ignorant) put me on the track
of something that sounded less tedious and more interesting...a
pitfall to be sure.


At the very least put this in a 'cleanup' routine :

Dim F As Form
For Each F In Forms
Unload F
Next

That solves a lot of simple problems

It would also be wise to log the Initialize and Terminate Events of
all Forms, UserControls and Classes

Private cmnDebugHandle As Integer

Sub Form_Initialize
cmnDebugHandle = RegObj( "SomeName" )
End Sub

Sub Form_Terminate
UnRegObj cmnDebugHandle
End Sub

//
RegObj() and UnRegObj() can reside in a .BAS module in which you can
maintain a list of 'living' Objects

It is interesting to have a Debug option where you can MsgBox that
list - it saves a lot of grief - even in the medium term

HTH
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kevin L | last post: by
12 posts views Thread by tshad | last post: by
5 posts views Thread by =?Utf-8?B?cnZhbmdlbGRyb3A=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.