Overview
The following errors may occur when developing an application in C++ or C# using the BioStar 2 Device SDK.
The error "Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'BS_SDK_V2.dll': The specified module could not be found." occurs when the corresponding DLL file is missing or when other dependency files required to run the DLL file are missing.
To resolve this issue, you need to locate the DLL file and copy it to the required folder, or install the Microsoft Visual C++ Redistributable.
Resolution
To run a file built with the BioStar 2 Device SDK, it is required that the folder present the following DLL files:
The following example is for a 64-bit environment.
- BS_SDK_V2.dll
- libcrypto-1_1-x64.dll
- libssl-1_1-x64.dll
If any of these DLL files are missing, the error will occur. Please make sure that all of these DLL files are present in the folder.
Notes for Sample Code
When using the BioStar 2 Device SDK sample code, the DLL files are copied through the Pre-Build event in the Visual Studio build settings.
Please check whether the files are correctly located in the specified folder and verify that the directory path and commands in the Pre-Build event are properly configured.
Detailed instructions on setting up the development environment can be found at the following link.
https://kb.supremainc.com/bs2sdk/doku.php?id=en:getting_started#building_a_development_environment
Note that the same error may occur even if the files are present, since the Microsoft Visual C++ Redistributable is also required.
BioStar 2 Device SDK uses OpenSSL for better secure communication. To load the related libraries, you need to install the corresponding Visual C++ Redistributable.
Please refer to the description below depending on the SDK library version.
Affected version: Version 2.8.2 or later versions
From BioStar 2 Device SDK v2.8.2, the OpenSSL library has been updated.
Please install the Microsoft Visual C++ Redistributable 2015, which provides the vcruntime140.dll file required by the SDK.
Download link:
https://www.microsoft.com/en-US/download/details.aspx?id=48145
BioStar 2 Device SDK revision note: v2.8.2
http://kb.supremainc.com/bs2sdk/doku.php?id=en:release_note_282
Note
With this updated SDK version, you do not need to include the old OpenSSL library files anymore:
- libeay32.dll
- ssleay32.dll
Affected version: Version 2.8.1 or earlier versions
BioStar 2 Device SDK v2.8.1 and earlier rely on the OpenSSL 1.0.2n libraries.
Please install the Microsoft Visual C++ Redistributable 2013 (x86), which provides the msvcr120.dll file required by the SDK.
Download link:
https://www.microsoft.com/en-us/download/details.aspx?id=40784