Link to home
Start Free TrialLog in
Avatar of idleworm
idleworm

asked on

Terminating VB Active-X DLL

I would like to know how to terminate an Active-X DLL once it has finished executing.

Avatar of wsh2
wsh2

As the ActiveX.DLL is nothing more than an Object in your program.. you ultimately terminate it as you would any other Object:

Set Object = Nothing

Please note.. that some DLLs may have Close/Quit/Shutdown methods that should be executed prior to setting the Object to nothing.. and are there to be executed to bring a smooth and logical conclusion to the DLL's processing.
You don't. An Active-X DLL is "loaded in memory" (for want of a better expression) when it's used and it gets unloaded when the process that uses it ends.
Avatar of idleworm

ASKER

Hi wsh2,

But how do I close/Quit/Shutdown a DLL before it terminates?


And caraf_q,

I dunno why my DLL doesn't get unloaded.  I tried to delete/replace the DLL file but it gives me a "Sharing Violation" error
idleworm, ActiveX DLLs simply do not get unloaded like you're suggesting.

If you want to be free to delete or replace your DLL you must ensure that any other processes that are using your DLL have been terminated first.

If you have set your DLL's compatibility options to Binary Compatibility, VB will sometimes load the DLL as you're coding in it. If you then try to re-compile it, it won't let you, for the same reason as above. If that happens, simply close VB and re-open your program, after which you can re-compile it no problem.

If that STILL doesn't work, though, you can do one of two things:

1 - Break binary compatibility (which is OK if your DLL has not yet been released; it just means a massive re-compile of all dependent components...)

2 - Copy your DLL to a new folder, and in the project's compatibility settings set it to be binary compatible to its copy, rather than the original. That way, even if it loads the binary compatible DLL in memory, you'll still be able to recompile, delete or replace the original.
Avatar of Guy Hengel [angelIII / a3]
I think idleworm's problem maybe that he is trying to recompile a dll, while another project (or running application) has the reference to that dll.
You simple need to close that other vb app, and it should work.

hope this helps

Adjusted points from 50 to 100
Thanks ppl,

Perhaps I should just tell u guys & gals what I'm trying to do...

1) I'm trying to create an ASP application that makes use of an Active-X Server Component
2) What I did was just creating an Active X DLL with VB
3) I'll then copy the DLL file to winnt\system32 after which I'll run "regsvr32 serverCom.DLL" to register the DLL
4) I'll then test the DLL (by running me ASP program)
5) Problem is when I recompile the DLL and try to copy it to winnt\system32, I'll get a "Sharing violation" error.
6) My question is - how do I terminate this DLL?  Is there a programing technique that unloads the DLL from the memory?
<"What I did was just creating an Active X DLL with VB">

Upon Compile.. VB should register the Active X DLL automatically (do VB Menu -> Project -> References to see if it is there after the compile).

A concern here is the versioning compatability you are using. (Project Properties -> Component Tab). The default is Project Compatability, but perhaps you are at the point when you should be using Binary as you have already transferred the component to your Windows NT system directory.

To be honest.. I STILL don't fully understand Compatability.. so I can't say with certainty that this is the problem. Therefore.. treat this as a <now flipping coin> guess.. <smile>
Gawd.. I gotta read the comments BEFORE I type.. LOL. My apologies.. but my last comment has been sagely covered earlier in this thread.. <smile>.
Looks like your ASP program doesn't properly terminate from where I'm standing.
Is there some registry tweaking which allows these DLLs to self terminate?




Can some kind soul out there explain to me what is this thing about No Compatibility, Project Compatibility and Binary Compatibility?
:)
Can some kind soul out there explain to me what is this thing about No Compatibility, Project Compatibility and Binary Compatibility?
:)
I believe this article explains it very well

http://www.comdeveloper.com/articles/binarycomp.asp
it's a simple mattar :

1. create that DLL and compile it no mattar where. you don't have to put it in system dir, nor register it.

2. every time you make a change in it - take care that you compile it again under ProjectCompitability setting.

3. in you asp code :
<%
Dim AA
Set AA=CreateObject("Dll.Class")
AA.SomePublicFunctionInDll
Set AA=Nothing
%>

4. there should be no problems with that !!
Hi AnswerTheMan,

Nope, it still won't work.  When I recompile the DLL, it still wouldn't overwrite the original one.
kill the dllhost.exe (Task Manager) before copying, this "evil" task holds the reference to your DLL as soon as you accessed the DLL via ASP

Cheers
to folow my prev comment succesfully, i suggest you do some more steps :
1. reboot.
2. create a new DLL  with same code but
   diffrent name and diffrent class name
3. compile it as my prev comment. don't
   move it anywhere, don't register it
   manually.
4. rewrite your asp code so that it will
   reffer the new dll.class you made
5. follow that basic asp code in my prev
   comment.


if you happened to test your dll by a VB client before trying the asp code - make sure the VB client sets the dll's object var to Nothing. (upon unloading the client it should be done automatically but never count on that).
angelIII:

well i've happened to see your name here and there complaining on other experts behaviour and getting points that they don't deserve.
if you like and enjoy this hobby - ok with me.
BUT - as one that seems to care that much for such issues you have better implement certain things upon yourself.

posting your ANSWER while all other responses here are COMMENTS does not go
along with a person who claim to be
a saint.

nobody can be sure that his suggstion will help the asker find his way. because you can never know how the asker will implement your suggestion.

that's why honest experts post comments rather then answers AND *YOU KNOW THAT*

you also know very well that the asker can accept your comment as an answer.

why the hell your responce had to be an ANSWER (don't forget to report on me to community support for using the word "hell") ??

 








I'm really sorry, and i see why you are surprised that i posted an answer.

I withdraw my answer in respect to that, but i insist that my proposal contains what i found in M$ MSDN for this problem, and it was the only one that worked for me (i had exactly the same problem!).

Cheers

BTW, (i don't insist on this) but your suggestion might not work:
1) an ActiveX Dll *HAS* to be registered in order for the Createobject to work!
2) the problem has nothing to do with compatibility problems (see below)!

The error was: "sharing violation": something is still accessing the DLL, and it is the DLLHOST.EXE which does that (for pooling purposes).

Regards
Hi angelIII,

Nope, it does not work either.  When I try to terminate the dllhost.exe, I receive an "Access Denied" response.

This is probably because you are not logged on as user that has launched this process. Even Administrative Permission won't help here.

You may use caraf_g's proposal to restart the web server, or you need to logon as user that has started the dllhost.exe, this should be the user account under the one the webserver is running. if you don't want to logout/logon all the time, you may try to launch the TaskManager started from a command com after issuing a SU (Switch User), available from the Resource Kit of NT.

Good luck
I haven't read through the whole thread, as it seems there are a lot of comments that are off topic, but here are a couple of other suggestions.

If you need to do this just for debugging purposes, I suggest that you check out a tool called DLLAgator.  I forget who produces it, but you run this application and then you test your ASP and DLLAgator will notice that your application (probably the web server) loaded your Active-X DLL.  One of the functions of this program is to track which applications use which DLLs, but, one other side feature is that it lets you explicity unload a dll through the tool.  I believe that I've used it for just this same thing.

If you were calling your Acitve-X DLL from a VB program, instead of ASP, I know that you could explicity load the DLL using LoadLibrary, and then Unload it using FreeLibrary, but I don't know if you can make Windows API calls from ASP.  Normally, when you try to instantiate an instance of an object in an Active-X DLL, VB handles loading the library into memory.  But, I think you can load it explictly yourself.  On the off-chance that you can do this in ASP, here are the functions and how you call them:  

' Global declarations
Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _
(ByVal lpLibFileName As String) As Long

Declare Function FreeLibrary Lib "kernel32" _
(ByVal hLibModule As Long) As Long


Dim sDLLName As String
Dim hWndHandle As Long
Dim lRC As Long

'The name of the dll you are trying to unload.
sDLLName = "abc.dll"

' Load the DLL before using it
hWndHandle = LoadLibrary(sDLLName)

' Do your processing here

' I'm not sure why you need to do this three times, but this was the
' code sample someone gave me.

'free the original instance
lRC = FreeLibrary(hWndHandle)

'free the instance you loaded with loadlibrary()
lRC = FreeLibrary(hWndHandle)

'one more time to be sure
lRC = FreeLibrary(hWndHandle)

angelIII : once he compile the new DLL he'll create - it's registered (on dev machine, and that what he's after).

idleworm :
did my last comment failed ?

if so - what does that DLL of yours do ?
does it access some APIs ? some other VB DLLs ? any classes ?

does other asp code that you write that does not create objects works fine ?


Hi AnswerTheMan,

Your last suggestion did work. What I did was to compile the DLL with diff names e.g. serv1.dll, serv2.dll...but still these files cannot be overwritten...and yes I've set the object (which was refering to the DLL) to "Nothing"

And yes, me DLL does make use of some other APIs e.g. CDO (cdo.dll) and Active Server Page Objects (asp.dll).  In addition, my DLL does have a module(.bas) which contains some Public Constants which is used by my Class Modules.

Actually, the ASP pages that makes use of this DLL work fine too except that I don't seem to be able to overwrite the DLL.
now, i don't understand * WHEN * exactly you can't * OVERWRITE * the dll ?

if that's happens AFTER you used it from your asp code it must be because you did not KILLED it or something inside it.

first, your asp code must set the DLL object variable to nothing :
if you assigned the variable ABC to the DLL when CreateObject - you must :
set ABC=Nothing
in you asp code.

Second - if you Create an Instant of objects inside you dll - you must KILL then (set to nothing) in the DLL class_terminate event.

if now, you run the dll from asp and want to check all that in dll code and recompile it - you'll have to reboot first.


Hi AnswerTheMan,

I'll check that out.  Will let u know in 2 days time coz me Server not with me right now
one thing i forgot to mention :

DLLs that meant to be called from asp does not usually have any GUI.
however - they CAN have GUI. i know some cases where at least 1 Hidden form is used as a controls container (Timer for example).
in case you did that - you must unload any GUI object on the Class_Terminate event :
Unload Form1
Set Form1=Nothing

setting the Dll.class to nothing DOES NOT kill the dll's GUI if exist, and then - you won't be able to "overwrite it ".

one more thing : in worst case : making an ActiveX EXE instead of that DLL and taking care that it will behave as In-Proccess Dll will probably give you more flexibilty in developing and overwriting issues.
on final version you can make it a DLL again if you want.
The problem is the web server (IIS or PWS) keeps a reference to the DLL even after it has finished using it.  Restarting the web server from the console does nothing so you will have to restart it from the command line.

Create a batch file in the system directory with these commands:
(mtxstop may not be necessary in PWS)


net stop iisadmin /y
mtxstop
net start w3svc
net start msftpsvc


This will stop and restart the processes that are holding a reference to your Dll and allow you to recompile.
That should be an answer, but considering the ream of text above me, I don't think that's a good idea!
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
paul :
just one question : how come that i use self-made VB OLE DLLs loaded in asp code
for a long time, developing on 2 difrent machines, using PWS and *NEVER* (!) have the problem you described ???

one thing i can conclude is that if i never had this problem and other one's dll is causing that problem - the problem is in the DLL.

sure - killing it the way you suggest will solve the temporary problem but is not a FIX\CURE to a not-well-written DLL.
The problem is probably not a poorly written DLL.  (I test my DLLs from VB clients for memory leaks and/or cleanup problems.)

This is a known problem documented in MS KB.  Apparently it is a feature not a bug.  :)  If you never got the problem you are a lucky AnswerTheMan!:

IIS
http://support.microsoft.com/support/kb/articles/Q166/2/79.asp?LN=EN-US&SD=gn&FR=0

PWS
http://support.microsoft.com/support/kb/articles/Q200/2/60.ASP

hmmm...that link says :
<<Windows 95 or Windows 98 computer that is running Microsoft ....>

well, i'm running NT....
Maybe that's the difference.  I don't know.  Chances are that it is the source of idleworm's problem, however.
Answer accepted
Thanks for the help
You're welcome but why do I deserve a B?
Hi PaulHews,


Why not???
PaulHews:
Be happy for what you got.. idleworm ABANDONED his only other question. The only thing Class 'A' about idleworm, is his/her self serving ego as he/she has wasted Expert's time and energies for his/her own benefit.. without even so much as an acknowledgement in the previous question and a subpar grade in this one.. <sheesh>.

To be honest, I think the only reason he/she even gave you a grade.. is because this (up to now) ingrate has another question going. Perhaps we should drop by his/her other question.. and drop a "why not?"

Idleworm:
If you want to succeed here.. you better dress up your act. You can start by giving PaulHews as courteous an answer to his question of you, as PaulHews gave to you in assisting you out with your predicament.
PaulHews,

Was it too high a grade or were you expecting something lower? Enlighten me pls.


wsh2,

Have I done something wrong here?  I badly needed help, so PaulHews gave me an answer to my problems and I accepted it.
Unless there is a problem with an offered solution, "A" would be the proper grade.  It doesn't cost you any more points to give a good grade, and it reflects on *your* grading average as well.  Many experts reviewing your grading average would refrain from commenting if they see a string of B's.

If you are giving lower than A grade, it is also courteous to explain why the solution did not meet your needs.

In accepting the comment as an answer.. you did well.. <smile>. In not responding in any kind of detail to PaulHews question of you, you did very poorly.
 
idleworm, asking a question here is easy.. getting an answer is the hard part. Answers come from years of experience in dropping code, debugging, fighting bugs and making things work. The fact that some of us choose to give back to a profession that we have prosperred in to assist others that have yet to progress as far.. is something to be respected. By your own words.. "I badly needed help".. and guess what.. PaulHews was here and saw you all the way through to a solution. And for that.. you award PaulHews a "B"? Tell me idleworm, what constitutes an "A" effort in your book?

The grading system here is simple common sense.. how well did the comment/answer fulfill the need of the question? If the answer fulfills 90-100% of the question requirement.. it gets an "A". If the answer fulfills 80-90% of the question.. it gets a "B".. 70-80% a "C".. 60-70% a "D" anything below that gets an "F". (idleworm.. take a moment and please explain the technical 10% of the question that was missed.. k?) <-- the gyst of PaulHews question.

But all of this pales in comparison to your earlier action.. as the most egregious thing you have done here at EE is ABANDONING your first question. You pose your question.. have Experts take their time and energies rejoining you with written solutions.. you then take the fruits of their efforts for YOUR own benefit.. and then have the audacity to never even take a moment to acknowledge your benefactors with a grade or a comment! Face it, idleworm that type of action is just self serving arrogance, thievery and the rudest of behaviours!

Abandoning questions, giving subsatisfactory grades, dissing people that took their own personal time to assist you for your own personal gain.. maybe you can answer your own add-on questions.. "Why Not?" and "Have I done something wrong here?" I eagerly await your rejoinder.. <smile>.
Hi Guys & Gals,

At least now I understood that PaulHews was expecting a higher grade from me.  

Let me assure you ppl that it was NOT MY INTENTION in anyway to give PaulHews a "LOW" or unsatisfactory grade.

When PaulHews provided me with a comment as an answer, I thought it was acceptable and  gave a "GOOD" as a grade.  But, little did I know that "GOOD" only constitutes a "B".  

I do apologize for my ignorance on that matter (not knowing "GOOD" is only a "B").  And PaulHews,  let me assure you that if the grading was "A", "B", "C"... instead of "Very Good", "Good", "Average" ..., I would have given you an "A".  I know that whatever I say here will not change a "B" to an "A", but I just would like to let you know that it was not my intention in anyway to discredit your assistance and help.  

Once again, my aplogies.....
:)  Thanks.
Just my two cents, EE is a great way of sharing the knowledge that each of us learns through our own experience.  I appreciate being able to go to a site and ask for other's knowledge about how to solve a problem that might take me weeks of hard work to figure out.  I'm only too happy to share what I know with others in return.

Grades and points are fun, because it hopefully provides for good-natured competition, and since they're free, why not be generous?  However, in my opinion, some experts are taking this stuff far too seriously and are forgetting the real purpose of this forum.
I agree 100%, except perhaps for the 5% about the experts "taking this stuff far too seriously."  I think 97% of the experts take it about 87% good natured-ly.  Meanwhile, the other 3% operate at about 76% of possible good-naturedness.  Keeping in mind that 86% of all statistics are wrong, *at least* 72% of all experts are taking it *at least* 62% good-naturedly.  ;)

Bottom line, if it stops being fun, I'm outta here!
PaulHews <--- very well versed in Reagonomics.. <smile>. A nice contrast to the liberal point of view proffered by mdougan.

I noticed in mdougan's profile that he/she is a well certified instructor.. and an accomplished Experts Exchange participant.. <smile>.

If I might be so bold mdougan.. may I ask you a couple of questions? Suppose you had one student that you were teaching and that student asked you a question. No sooner than you begin to repond, the student then obviously choose's not to listen (puts da ole walkman headphones on) to your response.. How long would you keep responding?

Suppose this happened over and over and over.. would you keep coming back to instruct this student.. mind you, at your own expense (and at the expense of others that truly do want to learn).. and then do it on your own personal time?

Or perhaps.. this same miscreant student approaches a professional peer of yours.. and asks him/her a question (in the same aloof manner).. a question that is going to take your friend's personal time, energy and preparation.. (as it did with you so many times).. would you hold your silence on the matter?

Now, if I read your comment correctly.. then all of the above is quite fine by you.. in fact.. regardless of the rude and uncaring behaviour of the student.. or the amount of time you invested in him/her.. you would be happy and good hearted about it, right?

I gotta tell ya mdougan.. you have the patience and temperament of Job. As you will recall, Job lived to be over 900 years old.. so clearly his time was of no great consequence.. and I must assume that time is also of no consequence to you. I mean who cares, if someone constantly sends you on wild goose chases and/or never bothers to read what so many have skillfully written.. we are here for knowledge.. the wisdom of Job.. right?

Now, forgive me for asking another question.. but I see by your profile you have 15 years experience. For the purposes of our discussion, lets say that is ALL in teaching Visual Basic Programming 101.. over.. and over.. and over. With each successive class, how much NEW Visual Basic 101 knowledge do you acquire.. (as you can now recite the textbox in your sleep backwards and forwards)?  

mdougan.. as you probably have surmised.. in many ways Experts Exchange is no different than this student / teacher scenario. Contrary to your opinion that the student is always right, I feel that the students actions should be brought to their attention.. so that they can be reminded that their actions do have consequences.. and then rather than turn the other cheek (as so many do) I afford them the opportunity to address/correct the situation. Obviously mdougan.. anything goes in your book.. and the correct approach to miscreant behaviour.. behaviour that does the student/questioner disservice.. is to good heartedly laugh.. and look the other way. Tell me mdougan.. what professional demeanor / life knowledge is imparted in doing things your way?

As to garnering knowledge.. I would  hardly reccomend EE as a MSCD cram course. Nor.. would I think to list EE on my resume as a qualifying Educational experience. Without a doubt, there are moments (such as these) that it is nice to have a discussion with your peers.. or to present them with a poser.. but I am sad to inform you, that IMHO, by and large that is NOT the reason that the bulk of the Experts here.

To my way of thinking the bulk of Experts are here because they want to give back to a profession that has rewared them well.. and to help others that are less accomplished than they are. Yup.. its sappy and altruistic.. but many of us just like helping those poor kidz going through real life Visual Basic Programming 101. I know I do. In the real world.. I can command on the $60-75/hour to spout my silliness and work a bunch of them to help satiate the greed of Uncle Sam every year. Judging by your profile, I am certain you can easily command the same.. if not better.. <smile>. So tell me mdougan.. why do we tread the boards here.. and do it for free?

It can only be one thing.. nothing feels better than the gratitude of knowing that someone less fortunate than we.. has been assisted.. because we took a moment to share.. that we took a moment to care. When a benificiary of such actions flaunts their indifference to such efforts. Just because we work for free.. does not mean that our efforts are worthless.

Experts Exchange is a community.. and as with any community there are standards. There's an old saying "Don't sh*t where you live". For EE to survive and prosper, it is imperative that we maintain it. Apathy is the bane of any community.. and on a large scale, it is the principle cause of any society's downfall. This is not to say YOU are apathetic (as you cared enough to express your views.. <smile>).. but in "good heartedly" forgiving the apathy of questioners I clearly believe your opinion to be wrong.

Anyhow.. that is only one person's opinion (mine.. YIKES!!!). I thank you for expressing your opinion, and only hope that you can respect mine as much as I respect yours.. <smile>.
wsh:

It is a joy to share with someone who really needs it and appreciates it.  There are those however, who abuse the system, taking information and expert advice without any acknowledgment or appreciation.  It would be unfortunate if, because I was treated badly a few times, I became less willing to share what little know-how I possess.  Thus, yes, I am unwilling to be treated badly, because I enjoy participating in this community.

OTOH, I still have to give people the benefit of the doubt.  And I am uncomfortable with the role of policing the site.  I would much rather live and let live than get bogged down in conflict with every slacker who conned me into doing his/her homework.  My enjoyment of the site would go to 0, and then I would have to say bye bye EE.  I think we also have to avoid jumping to conclusions about questioners.  Many of them are genuinely surprised that we should think they are in any way delinquent.

I appreciate that you've been looking out for abusers lately, and I've been more vigilant as a result.  I try to make comments on questions where I think the questioner might have bad intent, or just has been delinquent in keeping up with past questions.  

As a high school teacher, I had to have the patience of Job.  It's part of the Job description <eww>.  Confrontation with high school students is pretty much unavoidable these days, but one thing was drilled into us.  Comment on the behaviour, but not on the person.  Observed behaviour is inarguable (they'll try to say "I didn't do that!", but they generally know it doesn't work.)  But if you call someone a "lamer" or use terms like "ingrate" or "Class A self serving ego," no matter how much you think it is justified (or even if in some cases it is), you are just muddying the already angry red waters.

And please forgive my ignorance of American politics, but just what the heck was that "Reaganomics" bit about?
PaulHews:
Reagonomics.. a term coined during and about the Presidency of Ronald Reagan. It is derived from a (supply side) economic malaprop Reagan had made.. where, if you added up all the percentages he espoused.. they exceeded 100. The additional entendre in the statement, is that Reagan was a staunch Conservative.. based in a conviction for law and order.. not that that applied to you.. but rather as a possible contrast to mdougan's more liberal point of view.. <smile>.

<< But if you call someone a "lamer" or use terms like "ingrate" or "Class A self serving ego," no matter how much you think it is justified (or even if in some cases it is), you are just muddying the already angry red waters. >>

I see your point about the use of inflammatory rhetoric.. I also presume this to be the gyst of mdougan's comment.. and I find both of your thoughts to be very constructive.. <smile>.

-------------------------------------
For any society to succeed there is a definitive need for rules, laws and standards. In establishing such doctrines, it enables the members of the society to concentrate their efforts on things that are far more productive than had there been no stautes at all. Unfortunately, with all the good that rules, laws and standards provide us, they also create constraints, that for some individuals are most difficult to comply with. And that brings us to the difficult question of how do we exert the collective will of the society upon its members.

In actuality, there are three solutions to this dilemna. One.. is the Carrot, to coddle and cajole society's membership into a common practice; Two.. is the Stick.. to beat the membership into compliant submission; and Three.. is to change the rules, laws and standards.

One the Carrot.. is obviously the best choice of the three. However, without "real" rewards, a virtual impossibility to do.. <sigh>.

Two the Stick.. an eye for an eye.. a tooth for a tooth. The more painful the experience, the longer the lesson.

Three Change.. a most deliberate and time consuming propositon. If done to frequently, causes mass confusion. If done to slowly, creates splits of dissension.

I think it is rather obvious, which option I chose. Machiavelli may have been cruel.. but without a doubt.. the Prince was extremely effective.

--------------------------------------

PaulHews and mdougan.. what completely intrigues me with your well placed arguments.. is how you never address the cause of the problem. Turning the other cheek, while noble in its intention, hardly provides an educational experience to the miscreant perpetrator. Apathy is an answer to nothing. I have seen it suggested, that passive resistance is the proper course of action.. to just ignore the perpetrator whenever he/she presents a question. But what is accomplished in doing this? In my humble opinion (IMHO), blacklisting and/or silent ostracization from the community is a most cruel and unusal punishment.

No, to my way of thinking, straight forward honesty serves the best purpose.. the fact that I take the time to express at least shows a modicum of care.. the fact that the perpetrator chooses to read and respond to it (no matter how coarsely) shows that they care as well.. and with that more than one bridge of communication has been gapped to the betterment of the fold.

I want you to know, that I don't always use inflammatory language.. and that when I do.. it is with a better cause and purpose in mind. In the majority of cases, I post the questioner's history along with a codicle that the Expert may choose their own course of action.. and I have never been critical of an Expert for continuing to enjoin in the question despite my commented admonition.

As far as being the policeman of EE.. I truly doubt that I am. But I must tell you, being a messenger ain't all that it is cracked up to be.. <lol>.

Anyhow.. I look forward to hearing your solutions.. Carrot?.. Stick?.. Apathy? To be teachers as you are, with front line experience <Junior High School (13-15 year olds)?!?!?!?.. Ouch>, I'm certain that you can provide an affirmative approach in this matter.. that will greatly assist in the dissemination of knowledge.

Again, I greatly appreciate your time, energies and thoughts expressed. Thank YOU.. <smile>.
Speak softly and carry a big carrot?  Seriously, I think posting grading records and alerting people the way you do is very effective.  I have taken up the task myself.  I think if we have to resort to name calling, a) it doesn't do much good and b) we are only giving the abusers ammo if they want to go to CS (not that they will get much sympathy there :).

I think I have run out of intelligent things to say, so 'nuff said.  
I ran out of intelligence a long time ago.. LOL. "Speak softly and carry a big carrot?"... ROFLMAO.. well keyed!!!

<smile>
wsh2:

"I noticed in mdougan's profile that he/she is a well certified instructor.. "
Thanks!

"Suppose you had one student that you were teaching and that student asked you a question....How long would you keep responding?"
This happens all of the time in teaching, you answer the question as long as you think that your explanation will be useful to someone, not necessarily the person who asked it. At EE, there are many people who buy the questions or <listen> who might benefit.

"Suppose this happened over and over and over.. would you keep coming back to instruct this student.. mind you, at your own expense (and at the expense of others that truly do want to learn).. and then do it on your own personal time?"
Good point, if it takes away from others, no, you don't answer frivilous questions, but if it's a valid question, even if the person asking the question is a pain in the butt, does it matter? There are other people in the "classroom"

"this same ... student approaches a professional peer of yours.. would you hold your silence on the matter?"
I wouldn't get involved, my friends can take care of themselves.

"Now, if I read your comment correctly.. then all of the above is quite fine by you..you would be happy and good hearted about it, right?"
Yes because I don't do it for the gratitude I hope to get.  You rarely get gratitude from students, more likely attitude!  I do it as a personal challenge, to see if I can figure it out, and second because I think it's ridiculous that programmers are doomed to re-write code that has been written a thousand times by countless other programmers.  EE gives you a chance to save your own energy, and other's energy by sharing code.

"I gotta tell ya mdougan.. you have the patience and temperament of Job."
Try teaching techincal classes and you will understand, you have to learn patience to succeed.  You would not believe what you have to put up from students in a technical class.  You thnk you get bad grades here?  You could teach a perfect VB class, get straight A's on your evaluations from the class, and there is always one or two people in the class that will give you a D.  I learned that you're best off if you drop the low and the high grades and then it gives you a more accurate idea of how you actually did.

"I see by your profile you have 15 years experience. For the purposes of our discussion, lets say that is ALL in teaching Visual Basic Programming 101.."
No, 8 years doing Cobol and Natural II in mainframe environments.  Started teaching with the introduction of VB3, and have been training/consulting in it ever since.

"over.. and over.. and over. With each successive class, how much NEW Visual Basic 101 knowledge do you acquire.."
Another reason I like EE, it keeps me sharp and, oh my god, I can still learn a hell of a lot from my fellow Experts.  I don't know how many times I've said, "man, I've been doing that the hard way for years..."

"in many ways Experts Exchange is no different than this student / teacher scenario."
Absolutely correct.

"Contrary to your opinion that the student is always right, I feel that the students actions should be brought to their attention.. so that they can be reminded that their actions do have consequences.."
That was never my opinion.  Students are usually wrong (otherwise, why wouldn't they be the teacher?) and they are often a pain in the butt. Sure it's fine to teach people the etiquette, but I've just seen a *lot* of whineing comments lately about grades.

"Obviously mdougan.. anything goes in your book..is to good heartedly laugh.. and look the other way. Tell me mdougan.. what professional demeanor / life knowledge is imparted in doing things your way? "
If you spend the time arguing with the person, then you've just taken the whole thread off-topic and have done a disservice to everyone else in the thread, and everyone else who will ever read the thread.  My professional demeanor forces me to try to keep the discussion on topic and not let my ego blast the person, even if they deserve it. But you did get it right, my basic attitude is to laugh and look the other way.

"As to garnering knowledge.. but I am sad to inform you, that IMHO, by and large that is NOT the reason that the bulk of the Experts here."
I don't think you speak for the bulk of the Experts here.  I only know why I'm here.  It helps keep my knowledge current, it's generally a fun competition, I can pick up tips that save me a lot of time, and I can help other people out in the process, and I can win cool Visor toys and T-shirts.

"In the real world.. I can command on the $60-75/hour to spout my silliness and work a bunch of them to help satiate the greed of Uncle Sam every year. Judging by your profile, I am certain you can easily command the same.. if not better.. <smile>. "
Better <smile>, much better <grin>

"So tell me mdougan.. why do we tread the boards here.. and do it for free?"
I like telling other people what to do.

"It can only be one thing.. nothing feels better than the gratitude of knowing that someone less fortunate than we.."
This can not be your take-home point, I know you're not that much of an elitist.

"Experts Exchange is a community.. and as with any community there are standards. There's an old saying "Don't sh*t where you live". "
I couldn't agree more, but I differ with your method.  Trainers find that they get a much better response from people if you don't insult them.  It's from the Dale Carnige book.  Treat people nice, don't treat them like idiots, they probably didn't mean to transgress, they just didn't know the etiquette.  Just be polite and fill them in and the response will be better than if you come down hard on them.

"Apathy is the bane of any community.. and on a large scale, it is the principle cause of any society's downfall."
This is becomming a social movement ;)

"but in "good heartedly" forgiving the apathy of questioners I clearly believe your opinion to be wrong."
Everyone is entitled to their own opinion, even if it's wrong.

"I thank you for expressing your opinion, and only hope that you can respect mine as much as I respect yours.. <smile>."
I do respect your opinion, and hope that you've read my comments with the understanding that my tounge is in my cheek most of the time... ;)
mdougan & paulHews:
Thank YOU for rejoining. Your commentary has been enlightening.. and effective.. as I am now somewhat lightening the level of my rhetoric. Don't get me wrong.. I still slip into momentary lapses of danderous flaming.. but what the heck.. we have to have fun sometimes, huh?.. <j/k-lol>.

mdougan:
You bring up a good point about grading.. but, I find that in many cases the points brought up by the Expert are legitimate. I recently read a comment by the esteemd community support guru DarinW.. but then immediately set about losing it.. <sigh.. such is life>. Nevertheless, I will paraphrase the essence of how I understood it.

The purpose of the grading system.. is to allow a future Question Purchaser to get some kind of reference to the worth of the Answer contained within it.. BEFORE they have to expend resources to obtain it. In effect, the grade should reflect the completeness of the Question/Answer coupling. If the Answer contained within the Question satisfies question requirements, it should be graded on the basis of the scale below:

90-100% Complete Answer - Excellent "A"
80-90% Complete Answer - Good "B"
70-80% Complete Answer - Average "C"
60-70% Complete Answer - Below Average "D"
Below 60% "F"orget it

If you read the EE Guidelines.. it is the QUESTIONER's responsibility to bring the Question to a FULL and satisfactory conclusion. They are to do this by monitoring and responding to ALL Expert comments. If a Question requirement is unfulfilled, the Questioner is responsible to bring the insufficiency to the Expert's attention.

In theory, EVERY question should be brought to an "A" solution. The fact that lesser grades are awarded, is NOT the Experts fault, but rather the fault of the Questioner for NOT elaborating the reason. In that, in many cases.. I feel that some Questioner's are most derelict in their duty.. and should be apprised of the situation.. but I am certain that comes as no surprise to anyone here.. <smile> and a <wink>.

Whose fault is an incomplete answer? Obviously it is the questioner's.. BUT I also hold EE to blame as well. I don't know if you can remember the signup process.. but it is pretty much a bunch of <blah> <blah> <blah>.. fill out a questionairre.. and then go have fun and games with the Experts. I doubt that any of these miscreant questioners has the slightest idea of the EE Guidelines.. and out of ignorance.. inadvertently abuse a perfectly good knowledge based system. In most cases, if/when these people are educated to the grading system, many of them immediately adapt to the spirit of Expert Exchange. I only wish EE itself would spend more time in educating them rather than having it done at the expense of Experts in the closing of the question.. <sigh>.

Again.. this is just one person's humble opinion.. I wish you all well and great fortune.. <smile>.