Exception from HRESULT: 0xC0000005

TomPhillips

Active member
Joined
Feb 24, 2005
Messages
33
Programming Experience
10+
Exception from HRESULT: 0xC0000005[RESOLVED]

Help, I can't see my form in Design mode. Everything was fine till this showed up. The app still runs, but I can no longer see the form to modify it. What happened? And more Important, how do I fix it?

I get an icon, red ball with X and the message: "An error occured while loading the document. Fix the error, and then try loading the document again. The error message follows: Exception from HRESULT: 0xC0000005"

WTF does that mean?
 
Last edited:
Oops! sorry in my frustration, it just slipped out (what?).

Hmm. Operating System XP Pro, Visual Studio.NET 2003.
No com objects, just buttons, text boxes, and listboxes.

Since my last post, I tried to build a new form from scratch, but when I tried to place the SQLDataAdapter, I got the same error message popup. This morning, when I opened VS.NET and accessed my project, the new form is failing just like the first one.
 
Found the problem.

I had the assignment to MachineName:
VB.NET:
[font=Courier New][color=#0000ff][color=#000000][color=#0000ff]Public[/color] [color=#0000ff]Class[/color] frmForm1
 
[/color]Public Shared MachineName As String [/color][/font][font=Courier New][color=#ff0000]=[/color][/font][font=Courier New][color=#0000ff] System.Net.Dns.GetHostName.ToUpper().TrimEnd()[/color][/font]
 
[font=Courier New][color=#0000ff]#[color=#0000ff]Region[/color] " Windows Form Designer generated code "
 
[/color][/font]
in the wrong place. When I broke it up and put the assignment inside the Load sub, my problem went away.

I'd still like an explaination of the wierd response from Visual Studio, though.
 
It's a bug!

Turns out this is a Microsoft bug. I spent 4 hours on the phone with them and they acknowledged it and endorsed the work around. I got my alloted credit back.
 
Back
Top