Solved

VS2008 Form Loading Error - module not found?

Posted on 2014-11-21
2
163 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
A list of useful business intelligence software.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

734 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