Catastrophic failure (Ausnahme von HRESULT: 0x8000FFFF (E_UNEXPECTED))



  • Hat jemand eine Ahnung was das zu bedeuten hat?

    bei EnvDTE.CodeFunction.GetStartPoint(vsCMPart Part)
    bei Microsoft.VisualC.CppCodeParser.OnMethodPopulateStatements(Object sender, EventArgs e)
    bei System.CodeDom.CodeMemberMethod.get_Statements()
    bei System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
    bei System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
    bei Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
    bei System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
    

    Es würde mir schon helfen, wenn ich wüsste wonach ich suchen muss. Hier mal der Code dazu:

    #pragma once
    #include "Sidebar.h"
    
    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System::Data;
    using namespace System::Drawing;
    
    namespace Kinder {
    
    	ref class Sidebar;
    	ref class panelklasse;
    
    	public ref class systeminfo : public Kinder::panelklasse
    	{
    
    	ref class System::Windows::Forms::Form;
    
    	public:
    		systeminfo(void)
    			{
    				InitializeComponent();			
    			}
    
    		systeminfo(Sidebar^ instanz)
    			{
    			InitializeComponent();
    			sidebarinstanz = instanz;	
    			sidebarposition (this);
    			überschriftändern ("System Info");
    			timer1->Start ();
    			updatedata ();			
    			}
    
    	protected:
    
    		~systeminfo()
    		{
    			if (components)
    			{
    			delete components;
    			}
    		}
    	private: System::Windows::Forms::TextBox^  textBox1;	
    	private: System::Windows::Forms::Button^  button1;			 
    
    	public: 
    
    	static array <System::Diagnostics::Process^,1> ^prozessliste = gcnew array<System::Diagnostics::Process^>(1);
    	private: System::Windows::Forms::ToolTip^  toolTip1;
    	private: System::Windows::Forms::Timer^  timer1;
    	public: 
    
    		static int prozesse;
    
    		void speicher ();
    		void cpu ();
    		void updatedata ();
    		void prozesseanzeigen ();
    		void beenden ();
    
    	private: System::Windows::Forms::ProgressBar^  progressBar1;
    	protected: 
    	private: System::Windows::Forms::ProgressBar^  progressBar2;
    	private: System::Windows::Forms::Label^  label1;
    	private: System::Windows::Forms::Label^  label2;
    	private: System::Windows::Forms::Label^  label3;
    	private: System::Windows::Forms::Label^  label4;
    	private: System::ComponentModel::IContainer^  components;
    
    #pragma region Windows Form Designer generated code
    
    		void InitializeComponent(void)
    		{
    		this->components = (gcnew System::ComponentModel::Container());
    		System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(systeminfo::typeid));
    		this->progressBar1 = (gcnew System::Windows::Forms::ProgressBar());
    		this->progressBar2 = (gcnew System::Windows::Forms::ProgressBar());
    		this->label1 = (gcnew System::Windows::Forms::Label());
    		this->label2 = (gcnew System::Windows::Forms::Label());
    		this->label3 = (gcnew System::Windows::Forms::Label());
    		this->label4 = (gcnew System::Windows::Forms::Label());
    		this->textBox1 = (gcnew System::Windows::Forms::TextBox());
    		this->button1 = (gcnew System::Windows::Forms::Button());
    		this->toolTip1 = (gcnew System::Windows::Forms::ToolTip(this->components));
    		this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
    
    		this->SuspendLayout();
    		// 
    		// progressBar1
    		// 
    		this->progressBar1->Location = System::Drawing::Point(45, 28);
    		this->progressBar1->Name = L"progressBar1";
    		this->progressBar1->Size = System::Drawing::Size(100, 13);
    		this->progressBar1->TabIndex = 0;
    		// 
    		// progressBar2
    		// 
    		this->progressBar2->Location = System::Drawing::Point(45, 47);
    		this->progressBar2->Name = L"progressBar2";
    		this->progressBar2->Size = System::Drawing::Size(100, 13);
    		this->progressBar2->TabIndex = 1;
    		// 
    		// label1
    		// 
    		this->label1->AutoSize = true;
    		this->label1->BackColor = System::Drawing::Color::Transparent;
    		this->label1->ForeColor = System::Drawing::Color::White;
    		this->label1->Location = System::Drawing::Point(4, 28);
    		this->label1->Name = L"label1";
    		this->label1->Size = System::Drawing::Size(34, 13);
    		this->label1->TabIndex = 2;
    		this->label1->Text = L"RAM:";
    		// 
    		// label2
    		// 
    		this->label2->AutoSize = true;
    		this->label2->BackColor = System::Drawing::Color::Transparent;
    		this->label2->ForeColor = System::Drawing::Color::White;
    		this->label2->Location = System::Drawing::Point(4, 47);
    		this->label2->Name = L"label2";
    		this->label2->Size = System::Drawing::Size(32, 13);
    		this->label2->TabIndex = 3;
    		this->label2->Text = L"CPU:";
    		// 
    		// label3
    		// 
    		this->label3->AutoSize = true;
    		this->label3->BackColor = System::Drawing::Color::Transparent;
    		this->label3->ForeColor = System::Drawing::Color::White;
    		this->label3->Location = System::Drawing::Point(151, 28);
    		this->label3->Name = L"label3";
    		this->label3->Size = System::Drawing::Size(35, 13);
    		this->label3->TabIndex = 4;
    		this->label3->Text = L"label3";
    		// 
    		// label4
    		// 
    		this->label4->AutoSize = true;
    		this->label4->BackColor = System::Drawing::Color::Transparent;
    		this->label4->ForeColor = System::Drawing::Color::White;
    		this->label4->Location = System::Drawing::Point(151, 47);
    		this->label4->Name = L"label4";
    		this->label4->Size = System::Drawing::Size(35, 13);
    		this->label4->TabIndex = 5;
    		this->label4->Text = L"label4";
    		// 
    		// textBox1
    		// 
    		this->textBox1->BackColor = System::Drawing::Color::Black;
    		this->textBox1->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
    		this->textBox1->ForeColor = System::Drawing::Color::Transparent;
    		this->textBox1->Location = System::Drawing::Point(6, 65);
    		this->textBox1->Multiline = true;
    		this->textBox1->Name = L"textBox1";
    		this->textBox1->Size = System::Drawing::Size(179, 142);
    		this->textBox1->TabIndex = 6;
    		// 
    		// button1
    		// 
    		this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Uighur", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
    			static_cast<System::Byte>(0)));
    		this->button1->Location = System::Drawing::Point(135, 0);
    		this->button1->Name = L"button1";
    		this->button1->Size = System::Drawing::Size(24, 23);
    		this->button1->TabIndex = 7;
    		this->button1->Text = L"+";
    		this->toolTip1->SetToolTip(this->button1, L"Prozesse");
    		this->button1->UseVisualStyleBackColor = true;
    		this->button1->Click += gcnew System::EventHandler(this, &systeminfo::button1_Click);
    		// 
    		// timer1
    		// 
    		this->timer1->Interval = 5000;
    		this->timer1->Tick += gcnew System::EventHandler(this, &systeminfo::timer1_Tick);
    
    		// 
    		// systeminfo
    		// 
    		this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
    		this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    		this->BackColor = System::Drawing::Color::Black;
    		this->ClientSize = System::Drawing::Size(190, 65);
    
    		this->Controls->Add(this->button1);
    		this->Controls->Add(this->textBox1);
    		this->Controls->Add(this->label4);
    		this->Controls->Add(this->label3);
    		this->Controls->Add(this->label2);
    		this->Controls->Add(this->label1);
    		this->Controls->Add(this->progressBar2);
    		this->Controls->Add(this->progressBar1);
    		this->DoubleBuffered = true;
    		this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;
    		this->Name = L"System Info";
    		this->Opacity = 0.65;
    		this->ShowIcon = false;
    		this->ShowInTaskbar = false;
    		this->Text = L"System Info";
    		this->TopMost = true;
    
    		this->ResumeLayout(false);
    		this->PerformLayout();
    
    			}
    #pragma endregion
    
    	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
    				 {
    				 if (prozesse == 0)
    					 {
    					 this->Size = System::Drawing::Size (190, 219);
    					 this->Invalidate ();
    					 prozesse = 1;
    					 prozesseanzeigen ();
    					 return;
    					 }
    				 else if (prozesse == 1)
    					 {
    					 this->Size = System::Drawing::Size ( 190, 65);
    					 this->Invalidate ();
    					 prozesse = 0;
    					 return;
    					 }
    				 }
    
    	private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) 
    				 {
    				 updatedata ();
    				 }
    
    };
    }
    

    Wie ihr seht, habe ich auch immer das Problem, dass mein Code total durcheinander geworfen wird - wenn ich elemente hinzufüge. Wo bringt ihr eure Prototypen unter - dass das nicht passiert?



  • Das selbe Problem habe ich bei allen anderen Klasse die ich von der Panelklasse abgeleitet habe. Sie lassen sich alle nicht mehr im Designer anzeigen. Habt ihr ne Idee?



  • Ich glaube, das genau das das Problem ist welches ich habe. Noch einer kurzen Nacht habe ich nochmal einen Blick drübergeworfen (und wirklich nur einen Blick) und habe das Problem gefunden.

    Durch das ganze durcheinanderwürfeln des Designers wurden die Elemente als protected spezifiziert:

    Programmiersprache C++
    protected

    protected: [elementliste]

    proctected Basisklasse

    Das Schlüsselwort protected wird auf zwei unterschiedliche Arten verwendet:

    * Als Einleitung von Elementdeklarationen innerhalb einer Klassendefinition legt es fest, daß die folgenden Elemente "geschützt" sind:
    Sie stehen nur für abgeleitete Klassen, nicht aber für Routinen außerhalb der Klasse bzw. ihrer Ableitungen zur Verfügung.
    * Als Einleitung einer Liste von Basisklassennamen legt es fest, daß public- und protected-Elemente dieser Basisklassen als "geschützt" zu betrachten sind:
    Sie stehen nur für abgeleitete Klassen, nicht aber für Routinen außerhalb der Klasse bzw. ihrer Ableitungen zur Verfügung.

    Da bleibt immer noch die Frage wie ich dieses durcheinander Würfeln vermeiden kann. Wo genau setzt ihr eure Prototypen & Co.?



  • Es ist doch zum Mäusemelken. Der Designer ließ sich genau einmal starten. Nun wieder nicht. Verflucht nochmal.



  • Soviel ich weiss, markiert der Designer den Breich, den er generiert. Dort darfst Du nicht editieren.
    Simon



  • Ich muss zugeben, dass habe ich getan 😞 Man lernt niemals aus ...



  • Hi, after trying everything,

    You try it closing the Visual Studio, deleting the .ncb file of your solution, and then rebuild your project.
    It's a bit strange thing, but it worked to me.

    Good Luck!



  • Angel Pedro Montero schrieb:

    Hi, after trying everything,

    You try it closing the Visual Studio, deleting the .ncb file of your solution, and then rebuild your project.
    It's a bit strange thing, but it worked to me.

    Good Luck!

    Genau so mache ich das auch.
    Lösche die Datei .ncb von Deinem Projekt.
    Sollte danach wieder funzen...



  • Dat funzt. Das mache ich ab heute auch 🙂


Anmelden zum Antworten