I am using external dll,but i am getting this error
An unhandled exception of type 'System.DllNotFoundException' occurred in ACRCloudExtrTest.exe. Additional information: Unable to load DLL 'acrcloud_extr_windows_1.0.1.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
i've put the dll in the project folder, also in system32 and sysWOW64 but nothing worked.
Here i am calling the dll:
class ACRCloudExtr
{
public static byte[] CreateFingerprint(byte[] pcmBuffer)
{
byte[] fpBuffer = null;
if (pcmBuffer == null || pcmBuffer.Length <= 0)
{
return fpBuffer;
}
IntPtr pFpBuffer = IntPtr.Zero;
int fpBufferLen = create_fingerprint(pcmBuffer, pcmBuffer.Length, ref pFpBuffer);
if (fpBufferLen > 0)
{
fpBuffer = new byte[fpBufferLen];
Marshal.Copy(pFpBuffer, fpBuffer, 0, fpBufferLen);
free_fingerprint(pFpBuffer);
}
return fpBuffer;
}
[DllImport("acrcloud_extr_windows_1.0.1.dll")]
private static extern int create_fingerprint(byte[] pcm_buffer, int pcm_buffer_len, ref IntPtr fps_buffer);
[DllImport("acrcloud_extr_windows_1.0.1.dll")]
private static extern void free_fingerprint(IntPtr fps_buffer);
}