[DllImport("KERNEL32.DLL", EntryPoint="MoveFileW", SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool MoveFile(String src, String dst);
第二种:C++ 托管代码(用托管C++包装现有的dll,提供给C#调用)有2种方式:
使用 C++/CLI
#include
ref class CuryEasy
{
public:
CurlEasy()
{
easy = curl_easy_init();
}
private:
CURL* easy;
}