Click here to Skip to main content
16,005,467 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VS2008 development environment on 64-bit systems, I wrote two programs, a C # windows form program, reference a managed C + + dll, run the program results prompted an error FileLoadException error Exception from HRESULT: 0x800736B1

I see two programs solution platform is set anycpu,but it can run without problem when I solution platform is set to x86.
When I set to x64 mode, the performance was the same error of the situation anycpu mode.
What is the main reason of the problem?
Posted
Comments
Sergey Alexandrovich Kryukov 20-Feb-13 1:03am    
You might have some component (native DLL, non-entry assembly) compiled to certain target instruction-set architecture. Everything depends on combination of target platforms and OS platform. You need to describe in more detail what do you have. I can explain you the idea, but don't waste too much time for something which might not be the case.
—SA

Please see my past answer to related question: application for all windows OS[^].

If this is not enough for you to understand things, to help you more, I would need more detail from you.

—SA
 
Share this answer
 
Comments
peter462 21-Feb-13 2:14am    
the problem is solved, thank you!
When I download depends tool, View the related dll depends, found missing the msvcp90.dll and several similar files.So from the C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ redist \ amd64 copied to the need to file, the problem is solved.
Sergey Alexandrovich Kryukov 21-Feb-13 2:29am    
Pleasure to help someone who actually can solve problems.
So, will you accept my answer formally then (green button)?

By the way, please remove the solution (or solutions) which are not answers but comments or question clarification. This is considered abuse; you can only get down-voted for them...

—SA
In the beginning I also think that is The dll program dependent on the external environment results in an error, but when I simplify the procedure to a minimum, the problem still exists
Simplified code is very simple:
c + + dll part:
C#
#pragma once

using namespace System;

namespace CppDll {

    public ref class Class1
    {
        // TODO: Add your methods for this class here.
    };
}

win Form part:
C#
public Form1()
{
    CppDll.Class1 cls = new CppDll.Class1();
    InitializeComponent();
}
 
Share this answer
 
v2
Comments
peter462 20-Feb-13 3:09am    
by the way my os is win7 64-bit systems.
peter462 20-Feb-13 3:23am    
Processor: AMD Athlon(tm) II X2 245 Processor (2 CPUs)
the problem is solved, thank you!
When I download depends tool, View the related dll depends, found missing the msvcp90.dll and several similar files.So from the C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ redist \ amd64 copied to the need to file, the problem is solved.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900