Foxtable(狐表)用户栏目专家坐堂 → [求助]调用钉钉接口之后进程无法关闭


  共有5765人关注过本帖树形打印复制链接

主题:[求助]调用钉钉接口之后进程无法关闭

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111427 积分:567211 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/12/22 8:51:00 [显示全部帖子]

试试

try
    Dim client As DingTalk.Api.DefaultDingTalkClient = New DingTalk.Api.DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken")
    Dim request As DingTalk.Api.Request.OapiGettokenRequest = New DingTalk.Api.Request.OapiGettokenRequest()
    request.Appkey = "XXXXX"
    request.Appsecret = "XXXXXXXXX"
    request.SetHttpMethod("GET")
    Dim rsp As DingTalk.Api.Response.OapiGettokenResponse = client.Execute(request)
    Dim result As String = rsp.AccessToken
    Output.Show(result)
client =nothing
request=nothing
Catch ex As Exception

End Try

不行的话考虑到项目beforecloseproject事件用kill杀进程吧

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111427 积分:567211 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/12/22 12:03:00 [显示全部帖子]

Dim ps As  System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("某某进程名称")
For Each p As System.Diagnostics.Process In ps
    p.kill
Next

 回到顶部