把dll复制到foxtable安装目录,然后添加引用
全局代码,注意补齐命名空间(比如红色部分),我只举例添加了2个,至于是不是这个命名空间,我也不清楚,您咨询一下客服或者看看源码,剩下的自己补齐
public Sub Main1()
Try
Dim cred As TencentCloud.Common.Credential = New TencentCloud.Common.Credential With {
.SecretId = "xxx",
.SecretKey = "xxx"
}
Dim clientProfile As TencentCloud.Common.Profile.ClientProfile = New TencentCloud.Common.Profile.ClientProfile()
clientProfile.SignMethod = ClientProfile.SIGN_TC3SHA256
Dim httpProfile As HttpProfile = New HttpProfile()
httpProfile.ReqMethod = "GET"
httpProfile.Timeout = 10
httpProfile.Endpoint = "sms.tencentcloudapi.com"
httpProfile.WebProxy = Environment.GetEnvironmentVariable("HTTPS_PROXY")
clientProfile.HttpProfile = httpProfile
Dim client As SmsClient = New SmsClient(cred, "ap-guangzhou", clientProfile)
Dim req As SendSmsRequest = New SendSmsRequest()
req.SmsSdkAppid = "1400787878"
req.Sign = "xxx"
req.ExtendCode = "x"
req.SenderId = ""
req.SessionContext = ""
req.PhoneNumberSet = New String() {"+8613711112222"}
req.TemplateID = "449739"
req.TemplateParamSet = New String() {"666"}
Dim resp As SendSmsResponse = client.SendSmsSync(req)
msgbox(AbstractModel.ToJsonString(resp))
Catch e As Exception
msgbox(e.ToString())
End Try
End Sub
调用的时候直接调用Main1()函数即可