新手求助

k782411998 · · 1433 次点击
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
更多评论
你这是要 go 调用 C++?
#1
是的,刚才用py调用成功了,想改成用go
#2