【发布时间】:2016-08-23 04:45:13
【问题描述】:
我正在尝试让 betfair API 与 Windows API 一起使用。
我无法使用以下代码登录(用户名和密码已更改)。
char *headers = "X-Application: MakJhSABCDq8sbPIr\r\nAccept: application/json";
char *usernameandpassword = "username=mick&password=xyz123";
WinHttpSendRequest(
hrequest,
(LPCWSTR)headers,
-1,
usernameandpassword,
strlen(usernameandpassword),
strlen(usernameandpassword),
0);
但调用返回值为 ERROR_INVALID_PARAMETER。但我不知道哪个参数不好。
【问题讨论】:
-
当你对编译器撒谎时会发生这种情况。当你说你的文字是宽字符时你撒谎了。