我在C#中想调用的DLL文件中的函数,函数如下:
HRESULT WINAPI NLS_RapiInit (int nPort, int nRate, BOOL bCompress = 1);
HRESULT WINAPI NLS_RapiUninit (void);
BOOL WINAPI NLS_CopyFileW (LPCWSTR lpExistingFileName/*in*/, LPCWSTR lpNewFileName/*in*/, BOOL bFailIfExists/*in*/);我是这样调用的,
using System.Runtime.InteropServices;
...
[DllImport("Rapi.dll",CharSet=CharSet.Auto)]
public static extern int NLS_RapiInit (int nPort, int nRate, bool bCompress);
public static extern bool NLS_CopyFileW( LPCWSTR lpExistingFileName/*in*/, LPCWSTR lpNewFileName/*in*/, bool bFailIfExists/*in*/);
可总提示错误:找不到类型或命名空间名称“LPCWSTR”(是否缺少 using 指令或程序集引用?)