Solved

VS2008 Form Loading Error - module not found?

Posted on 2014-11-21
2
164 Views
Last Modified: 2014-11-21
I hope this is simple.  I am debugging someone elses code.  Prior version have worked in debug mode just fine, but this one is not even loading the main form.  It throws the error "The specified module could not be found. (Exception from HRESULT: 0x8007007E)".  

The command line it is hanging up on is "Application::Run(gcnew Form1());".  Below is the code.

I have compared this with the previous versions that worked and see no differences.  I also replaced the Form1.h and Form1.resx files with older ones to see if maybe one of them was corrupted.

I am new to this so please be gentle.  It wouldn't surprise me if it was something super obvious.  Though I didn't see this topic on my search.

Thanks in advance for your help.


int main(array<System::String ^> ^args)
{
	try
	{
		bool ok = false;
		
		System::Threading::Mutex^ m = gcnew System::Threading::Mutex(true, "REDACTED", ok);
		if (! ok)
		{
			MessageBox::Show("Another instance is already running","ERROR",MessageBoxButtons::OK,MessageBoxIcon::Error);
			return 0;
		}

		// Enabling Windows XP visual effects before any controls are created
		Application::EnableVisualStyles();
		Application::SetCompatibleTextRenderingDefault(false); 

		// Create the main window and run it
		Application::Run(gcnew Form1());
		GC::KeepAlive(m); 
	}
	catch(Exception^ ex)
	{
		MessageBox::Show("Application Exception: "+ex->Message,"ERROR",MessageBoxButtons::OK,MessageBoxIcon::Error);

	}
	return 0;

}

Open in new window

0
Comment
Question by:EQUINN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
EQUINN earned 0 total points
ID: 40458940
Problem solved. I copied some support files from the debug directory to the release directory and that did the trick. I had always thought it was the other way around.
0
 
LVL 1

Author Closing Comment

by:EQUINN
ID: 40458942
Solved it on my own
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
Viewers will learn how to use the Hootsuite Dashboard.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question