By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

HRESULT 0x8007007E confusion

P: n/a
I'm migrating a project from one machine to a newer machine. The
project has several C++/CLI DLLs, as well as a lot of C#. On the older
machine, everything runs. On the newer machine, I get a
System.IO.FileNotFoundException just as I call into a function using a
part of one of the C++ DLLs. Something like this:

public class CSharpThing
{
public CSharpThing()
{
CallUnmanaged();
}

public void CallUnmanaged()
{
//here's an unmanaged call!
}
}

The exception occurs on the line where CallUnmanaged is CALLED, not
where the unmanaged call itself is. That sort of makes me think it's
something to do with the CRT not being found, as the module itself is
being referenced properly.

What really gets me is that the InnerException is null. The FileName is
ALSO null, which is REALLY freaky. What on EARTH am I supposed to take
away from an exception like that?

Lee Crabtree
Sep 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Lee Crabtree" <lc*******@goisi.comwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
| I'm migrating a project from one machine to a newer machine. The
| project has several C++/CLI DLLs, as well as a lot of C#. On the older
| machine, everything runs. On the newer machine, I get a
| System.IO.FileNotFoundException just as I call into a function using a
| part of one of the C++ DLLs. Something like this:
|
| public class CSharpThing
| {
| public CSharpThing()
| {
| CallUnmanaged();
| }
|
| public void CallUnmanaged()
| {
| //here's an unmanaged call!
| }
| }
|
| The exception occurs on the line where CallUnmanaged is CALLED, not
| where the unmanaged call itself is. That sort of makes me think it's
| something to do with the CRT not being found, as the module itself is
| being referenced properly.
|
| What really gets me is that the InnerException is null. The FileName is
| ALSO null, which is REALLY freaky. What on EARTH am I supposed to take
| away from an exception like that?
|
| Lee Crabtree

This means that one of the C++ DLL's or (more likely) some of it's dependent
DLL's are missing. Make sure you have the CRT version installed to be the
same as on your development box.
Willy.
Sep 26 '06 #2

P: n/a
Well, that problem was solved, but I've hit another one that seems
related to the CRT problem. The error doesn't actually produce an
exception (even when running in the debugger), it just brings up the
"Report this error to Microsoft" window. When I check the "what does
this error report contain?" link, I notice the C runtime library
referenced, but after checking the Platform SDK versions loaded, I
notice they're the same. However, a couple of the C++ DLLs use ATL and
were built with VS2003.

What bites is that, since they use ATL and MFC, I can't compile them
under VC2005 Express. Is there some way to get the runtime from the
older version of Studio?

Lee Crabtree

Willy Denoyette [MVP] wrote:
"Lee Crabtree" <lc*******@goisi.comwrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
| I'm migrating a project from one machine to a newer machine. The
| project has several C++/CLI DLLs, as well as a lot of C#. On the older
| machine, everything runs. On the newer machine, I get a
| System.IO.FileNotFoundException just as I call into a function using a
| part of one of the C++ DLLs. Something like this:
|
| public class CSharpThing
| {
| public CSharpThing()
| {
| CallUnmanaged();
| }
|
| public void CallUnmanaged()
| {
| //here's an unmanaged call!
| }
| }
|
| The exception occurs on the line where CallUnmanaged is CALLED, not
| where the unmanaged call itself is. That sort of makes me think it's
| something to do with the CRT not being found, as the module itself is
| being referenced properly.
|
| What really gets me is that the InnerException is null. The FileName is
| ALSO null, which is REALLY freaky. What on EARTH am I supposed to take
| away from an exception like that?
|
| Lee Crabtree

This means that one of the C++ DLL's or (more likely) some of it's dependent
DLL's are missing. Make sure you have the CRT version installed to be the
same as on your development box.
Willy.

Sep 26 '06 #3

P: n/a

"Lee Crabtree" <lc*******@goisi.comwrote in message
news:45**************@goisi.com...
| Well, that problem was solved, but I've hit another one that seems
| related to the CRT problem. The error doesn't actually produce an
| exception (even when running in the debugger), it just brings up the
| "Report this error to Microsoft" window. When I check the "what does
| this error report contain?" link, I notice the C runtime library
| referenced, but after checking the Platform SDK versions loaded, I
| notice they're the same. However, a couple of the C++ DLLs use ATL and
| were built with VS2003.
|
| What bites is that, since they use ATL and MFC, I can't compile them
| under VC2005 Express. Is there some way to get the runtime from the
| older version of Studio?
|

It all depends on the way you linked the modules (ATL and MFC), there
shouldn't be a problem when statically linking, if you are dynamically
linking you should distribute the dependent libraries with your application.
More info can be found on MSDN, search for "side by side" and isolated
application development and deployment.
Note that you may get better answers when posting to the VC language NG.

Willy.
Sep 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.