C++中
extern "C" void _declspec(dllexport) Findmatchedimages(char* InputImagePath)
C# 中
[DllImportAttribute("SearchImage.dll", EntryPoint = "Findmatchedimages", CallingConvention = CallingConvention.Cdecl,CharSet=CharSet.Ansi)]
public static extern void Findmatchedimages(StringBuilder InputImagePath);
StringBuilder InputImagePath = new StringBuilder(AppDomain.CurrentDomain.BaseDirectory +Image1.ImageUrl);
Findmatchedimages(InputImagePath);
既可以将StringBuilder 类型的InputImagePath值传入到C++dll中的char* 作为输入参数。