How can I ensure that auth.dll can be loaded?

1

I'm trying to use crypto++ in c++ clr class library.

The problem is that I get an error as I run the app, but it builds successfully.

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'auth.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
   at ConsoleApp52.Program.Main(String[] args)

This error only occurs when I include anything from crypto++

#include "dll.h"
#include "sha.h"
#include "filters.h"
#include "hex.h"

If I remove the following lines, it works.

I've tried copying the cryptopp.dll to the bin/x64/Debug and bin/Debug, but it did not resolve the issue.
What else do I need to include? Am I Missing something?

Dependecies:
dependencies


libs

build

solution

c#
c++
clr
crypto++
asked on Stack Overflow Feb 7, 2020 by porsekin • edited Feb 7, 2020 by Konrad Rudolph

1 Answer

2

Error code 0x8007045A most often means 32/64 bit DLL incompatibility.

If you're using native DLLs with managed code, make sure to use 64-bit versions on a 64-bit OS.

answered on Stack Overflow Feb 7, 2020 by rustyx

User contributions licensed under CC BY-SA 3.0