日期:2014-05-17 浏览次数:20728 次
extern "C" _declspec(dllexport) int CCodeInitApp::Code(char * path,char * str)
{
int plen =strlen(path);
int slen=strlen(str);
return 0;
}
[DllImport("CodeInit.dll", CharSet = CharSet.Auto)]
public static extern int Code(string path, string str);
Code("d:\\config.ini","config")
[DllImport("CodeInit.dll", CharSet = CharSet.Auto)]
public static extern int Code([MarshalAs(UnmanagedType.LPTStr)] string path, [MarshalAs(UnmanagedType.LPTStr)] string str);