2020-05-14 07:52 AM
I'm having problems loading the CR95HF.dll library into the Visual studio 2019 development environment. When I try to add the file copied in the path C:\Windows\System32\ the system returns the following error: "A reference "CR95HF.dll" can't be added, Please make sure that the file is accessible and that it is a valid assembly or COM component.
Can someone help me?
Solved! Go to Solution.
2020-05-24 12:44 PM
Hi,
see https://docs.microsoft.com/en-us/dotnet/framework/interop/creating-prototypes-in-managed-code to create the prototypes to use the API from the DLL.
Rgds
BT
2020-05-15 01:06 AM
Hi
can you share more information about your environment (Win 10?) and the programming language being used (C#?)?
if using C#, make sure to follow the various post about Unmanaged C++ Dll Call From Managed C# Application.
Rgds
BT
2020-05-15 01:10 AM
My environment is windows 10.
I'm working on a Windows Forms App (.NET Framework) project, in VB code.
2020-05-15 01:20 AM
Hi,
CR95HF.dll is an unmanaged DLL (see http://net-informations.com/faq/net/dll.htm for differences between managed and unmanaged DLL). Have you registered the DLL (regsvr32)?
Rgds
BT
2020-05-15 01:38 AM
I put my file in the project folder (...\bin\CR95HF.dll). I tried to upload it via the command prompt with the regsvr32 command but the following error came back: "The module "P:\...\bin\CR95HF.dll" failed to load.
Make sure the binary is stored at the specified path or debug it to check for problrms with the binary or dependent .DLL files.
The specified module could not be found.".
2020-05-15 01:55 AM
Sorry, it seems registration is not what is needed as there is no exported DllRegisterServer in this DLL.
See https://docs.microsoft.com/en-us/dotnet/framework/interop/consuming-unmanaged-dll-functions
Rgds
BT
2020-05-18 06:18 AM
Ah ok, so what should be the code to include the CR95HF.dll file in my project?
Thank you in advance.
FP
2020-05-24 12:44 PM
Hi,
see https://docs.microsoft.com/en-us/dotnet/framework/interop/creating-prototypes-in-managed-code to create the prototypes to use the API from the DLL.
Rgds
BT