我正在尝试通过 Go 调用 idm api。查了Python和C#的实现,用Go写了一个demo,但是运行不起来,报如下错误,请问有大神可以告诉我原因,或者提供一个可以调用api的demo吗?
Exception 0xc0000005 0x0 0xffffffffffffffff 0x7ff973decc86
PC=0x7ff973decc86
syscall.Syscall9(0x7ff973e61f10, 0x9, 0x1c30f1a55f8, 0x1c30f1e0fe8, 0x1c30f1cb478, 0x1c30f1cb4f8, 0x1c30f1cb798, 0x1c30f1cb518, 0x1c30f1cb578, 0x1c30f1cba78, ...)
C:/Go/src/runtime/syscall_windows.go:214 +0xf2
main.(*ICIDMLinkTransmitter).SendLinkToIDM(0x1c30f1d20e8, 0x1c30f1a55f8, 0x1c30f1e0fe8, 0x1c30f1cb478, 0x1c30f1cb4f8, 0x1c30f1cb798, 0x1c30f1cb518, 0x1c30f1cb578, 0x1c30f1cba78, 0x1c300000000, ...)
C:/D/gocode/idm/main.go:52 +0x145
main.(*IDMLinkTransmitter).SendLinkToIDM(0xc000006028, 0xfdf9aa, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
C:/D/gocode/idm/main.go:97 +0x2fc
main.main()
C:/D/gocode/idm/main.go:130 +0x105
rax 0x70007400740068
rbx 0x1082f80
rcx 0x69d75ffc60
rdi 0x3
rsi 0x69d75ffc60
rbp 0x69d75ffc30
rsp 0x69d75ff880
r8 0x3
r9 0x1c30f1cb4f8
r10 0x1c30f1d20e8
r11 0x1c30f1cba78
r12 0x11
r13 0x10
r14 0x1c30f1a55f8
r15 0x2030000
rip 0x7ff973decc86
rflags 0x10202
cs 0x33
fs 0x53
gs 0x2b
exit status 2
这是我的代码: https ://github.com/Greyh4t/callidm
这是 api 手册: http: //www.internetdownloadmanager.com/support/idm_api.html
这里是 Python 的实现: Use IDM(Internet Download Manager) API with python