How to use a C++ dll in Unity3D

I want to use C++ DLL in Unity, but I am prompted with “DllNotFoundException” error in Unity.I tried the method of others on the network, it didn’t work for me.

I want to use C++ DLL in Unity, but I am prompted with “DllNotFoundException” error in Unity.I tried the method of others on the network, it didn’t work for me.

I tried the method on Unity’s official website, but it didn’twork.
https://docs.unity3d.com/2017.3/Documentation/Manual/NativePlugins.
html
Unity - Manual: Building Plugins for Desktop Platforms
Running the SimplestPluginExample Demo of Unity’s official website is also prompted with “DllNotFoundException” error in Unity.

extern "C" int __declspec(dllexport) AddTwoIntegers(int a, int b)
{
return a + b;
}
put the MyDLL.dll in Assets/Plugins
[DllImport("MyDLL")]
private static extern int AddTwoIntegers(int a, int b);
void Start ()
{
Debug.Log(AddTwoIntegers(2, 3));
}
DllNotFoundException: MyDLL

I solved my problem.My system is 64 bit.I used VS to create 64-bit DLL.This dll in my Unity is correct,not error tip.