yangyanzhao
yangyanzhao
2017-03-07 06:25

无法从“overloaded-function”转换为“TIMERPROC”

40
  • settimer

SetTimer(NULL, 0, 1000, (TIMERPROC)Timer2Proc);

void CALLBACK NetSocket::Timer2Proc(HWND hWnd, UINT nMsg, UINT nTimerid, DWORD dwTime)
{
int err;
byte buf[32] = "";
char recvbuf[32] = "connect!!";
byte back[20] = {};
memset(buf, 0, sizeof(buf));
SetTimer(NULL, 1, 10000, SocketTimeOut);
err = Send(index, buf, back, 0, sizeof(buf));
KillTimer(NULL, 1);
}
SetTimer总是报错

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答