调用dll文件,本应该创建该文件,但是在指定文件夹中并未显示出该文件

 string a= "D://nihao.docx";
            Char[] result = new Char[1024];
            int check;
            check = CPPDLL.createCombinationFile(a.ToCharArray());
                        //创建该文件,成功返回0,运行时返回0,但在指定目录下并未出现该文件
            check = CPPDLL.writeCombinationFile(a.ToCharArray() ,0 ,a.ToCharArray());
                        //打开并写入,若打开的文件不存在,返回1,存在返回0,运行时返回0,但指定目录下并未出现该文件
            check = CPPDLL.readCombinationFile(a.ToCharArray() ,0 ,result);

dll函数导入:

 class CPPDLL
    {
        [DllImport(@"G:\信息安全作品赛\清源源码\界面5.13\界面\bin\Combination.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern int createCombinationFile(Char[] path);

        [DllImport(@"G:\信息安全作品赛\清源源码\界面5.13\界面\bin\Combination.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern int writeCombinationFile(Char[] path, int count, char[] comment);

        [DllImport(@"G:\信息安全作品赛\清源源码\界面5.13\界面\bin\Combination.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern int readCombinationFile(Char[] path, int count,char[] outArray);

    }

Dll函数成功调用,但是调用后并无效果,很奇怪,原DLL函数经测试过,并未出现以上问题

你的路径分割用反斜杠,(\\
用管理员权限运行程序。