Click here to Skip to main content
Sign Up to vote bad
good
See more: C++C#DLL
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 19 Feb '13 - 18:42

Comments
Sergey Alexandrovich Kryukov - 20 Feb '13 - 1:03
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

3 solutions

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
  Permalink  
Comments
peter462 - 21 Feb '13 - 2:14
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:29
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
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.
  Permalink  
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:
#pragma once
 
using namespace System;
 
namespace CppDll {
 
    public ref class Class1
    {
        // TODO: Add your methods for this class here.
    };
}
win Form part:
public Form1()
{
    CppDll.Class1 cls = new CppDll.Class1();
    InitializeComponent();
}
  Permalink  
Comments
peter462 - 20 Feb '13 - 3:09
by the way my os is win7 64-bit systems.
peter462 - 20 Feb '13 - 3:23
Processor: AMD Athlon(tm) II X2 245 Processor (2 CPUs)

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 310
1 Aarti Meswania 250
2 Sergey Alexandrovich Kryukov 249
3 Slacker007 240
4 Ron Beyer 190
0 Sergey Alexandrovich Kryukov 8,598
1 OriginalGriff 7,024
2 CPallini 3,668
3 Rohan Leuva 3,011
4 Maciej Los 2,343


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid