AnsiString str="interface ip add address \"本地连接\" static 192.1.2.44 255.255.255.0 1";
ShellExecute(Application ->Handle ,"open","netsh",str.c_str(),NULL,SW_HIDE);
以上代码放在一个按钮的click 里面 ShellExecute ()返回值是42,也就是函数执行成功,可是ip没有增加啊 求指导。
ShellExecute(Application ->Handle ,"open","netsh",str.c_str(),NULL,SW_HIDE);
以上代码放在一个按钮的click 里面 ShellExecute ()返回值是42,也就是函数执行成功,可是ip没有增加啊 求指导。
后面那个1不要,那是添加网关才用的.
------------------------------------------------------------------------sign
int system(
const char *command //Command to be executed.
);