使用autoIt的脚本:
Global $a_iCall, $MYAPIDLL = DllOpen("iphlpapi.dll")
Dim $index1
Dim $name = "BFB3502D-3CDF-4276-B4F5-EA55105D1608"
$a_iCall = DllCall($MYAPIDLL, "ULONG_PTR", "GetAdapterIndex","DWORD_PTR",$name,"ULONG_PTR",$index1)MsgBox(1,"a_iCalldd",$a_iCall[0]);这里上面用的是API里面的GetAdapterIndex函数,msdn对这个函数的介绍如下:
DWORD GetAdapterIndex(
  _In_     LPWSTR AdapterName,
  _Inout_  PULONG IfIndex
);
Parameters
AdapterName [in]
A pointer to a Unicode string that specifies the name of the adapter.
IfIndex [in, out]
A pointer to a ULONG variable that points to the index of the adapter.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, use FormatMessage to obtain the message string for the returned error.现在我总是返回错误码87,也就是参数不正确
我不知道怎么设置AutoIt里面的参数,对应API的参数类型AutoIt API