![image.png](https://static.studygolang.com/171211/df3862720caed09a2c52cefcf016a37e.png)
求助大神,这个接口如何调用?
wlan,_ := syscall.LoadLibrary("Wlanapi.dll")
wlanOpenHandle,_ := syscall.GetProcAddress(wlan,"WlanOpenHandle")
negotiated_version := uint32(0)
dwClientVersion := uint32(2)
kernel32 := syscall.NewLazyDLL("kernel32.dll");
CreateToolhelp32Snapshot := kernel32.NewProc("CreateToolhelp32Snapshot");
pHandle,_,_ := CreateToolhelp32Snapshot.Call(uintptr(0x2),uintptr(0x0));
ret,ret1,err := syscall.Syscall6(uintptr(wlanOpenHandle),
4,
uintptr(unsafe.Pointer(&dwClientVersion)),
uintptr(0),
uintptr(unsafe.Pointer(&negotiated_version)),
uintptr(pHandle),
0,
0,
)
fmt.Println("ret:",ret)
写到现在,报错50,到微软官方文档上查了一下
#3
更多评论