求助大神,这个接口如何调用?
wlan, := syscall.LoadLibrary("Wlanapi.dll") wlanOpenHandle, := syscall.GetProcAddress(wlan,"WlanOpenHandle") negotiatedversion := 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,到微软官方文档上查了一下
更多评论