I'm ripping a thread that I created a few days ago, since I used the
exact same subject line as a previous one.

In addition, I can also say that since I posted this thread, I've come
to the conclusion that this application is hitting some sort of wall
with regards to Window handles. I'm leaning towards this being one of
the primary issues because when a user selects a "tool" from a Form
(it launches the core application, which is quite large), you can
immediately kill the Form, go back to the tool selection Form...select
it again, and it will _always_ fail to load the 2nd time. The
application just dies.

Furthermore, I've got try/catch blocks all over the place, sending the
Exceptions to a logfile, and nothing ever gets logged once it gets in
this state. You're forced to do the ole' Win98 CTRL-ALT-DEL at that
point.

So, the question is this: If I'm correct (or partially) in that Window
handles might be the culprit, how do I resolve it? I spent an entire
day forcing dispose() on everything I could possibly think of, as well
as using things like the Performance Counters to identify problematic
(meaning, resource hungry) classes, and I still get the same result...

Can anybody (Microsoft?) help or even give me some kind of direction?

Here's the original post...

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

I have a C# Application that is posing some interesting issues when
run within Win98. Let me preface this by saying that everything works
like a charm under Win2000.

Anyhow, the current issue is that under "certain" circumstances
(there's no logic as to how/why this happens), you will fire up this
application under Win98 and get a "DragDrop Error: registration
failed" MessageBox from JIT.

The source code line in question is, of course, a simple
"this.AllowDrop = true;" property. If I were to remove it, the problem
would go away. Of course, I need that call in order for the
application to function correctly.

And before anybody asks the obvious, I _do_ have the following line in
my main Form:

[STAThread]
static void Main(string[] args)

I can't really make heads or tails out of this issue, and it
definitely presents itself only under Win98.

This particular Win98 machine is up to scratch, in terms of
patches/updates/etc. The OS has IE6.0 installed, as well as .NET
runtime v1.1. The Application is compiled using .NET Studio 2003.

Can anybody shed any light on this? Any workarounds?