bool GetConfigFieldW(int slot, wchar_t * config, char_t * field, int fieldLen, wchar_t * reason, int reaLen);
特别是 wchar_t * & char_t * 这两个参数是如何传递的,谢谢!
[DllImport("Netapi32.dll", EntryPoint = "NetUserChangePassword", CharSet = CharSet.Unicode)] public static extern int NetUserChangePassword( [MarshalAs(UnmanagedType.LPWStr)] string domainname, [MarshalAs(UnmanagedType.LPWStr)] string username, [MarshalAs(UnmanagedType.LPWStr)] string oldpassword, [MarshalAs(UnmanagedType.LPWStr)] string newpassword);
供参考,wchar_t和char_t 应该也是字符串,只是编码方式不同
参考下,http://www.cnblogs.com/heifengwll/p/3995441.html
其他的再百度吧