初级会员
  • 第 14582 位会员
  • k782411998
  • 2017-11-28 10:42:39
  • Offline
  • 20 57

最近发布的主题

最近发布的文章

    暂无

最近分享的资源

    暂无

最近发布的项目

    暂无

最近的评论

  • 评论了主题 新手求助
    #4 @k782411998 已经搞定
  • 评论了主题 新手求助
    package main import ( "fmt" "syscall" "unsafe" ) var ( WlanOpenHandle32,_ = syscall.LoadLibrary("Wlanapi.dll") WlanOpenHandle,_ = syscall.GetProcAddress(WlanOpenHandle32,"WlanOpenHandle") ) func abort(funcname string, err error) { panic(fmt.Sprintf("%s failed: %v", funcname, err)) } func main() { negotiated_version := uint32(0) client_handle := uint32(0) dwClientVersion := uint32(2) var nargs uintptr = 4 ret,_,callErr := syscall.Syscall6(uintptr(WlanOpenHandle), nargs, uintptr(dwClientVersion), 0, uintptr(unsafe.Pointer(&negotiated_version)), uintptr(unsafe.Pointer(&client_handle)), 0, 0, ) if client_handle != 0{ abort("StartWLANHandle", callErr) } result = int(ret) return }
  • 评论了主题 新手求助
    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,到微软官方文档上查了一下
  • 评论了主题 新手求助
    #1 @channel 是的,刚才用py调用成功了,想改成用go