IOCtl and mfc 4.0
yair -- yair@mirabilis.com
Sunday, November 10, 1996
Environment: VC++ 4.0, Win95/winNT4.0
Hi all,
I have this weird probelm with mfc4.0
i try to USE IOCtl on a TCP socket.
now, when i use it with the FIONBIO option and parameter is 1 (turn
non blocking mode on) the function always failed.
when i look at the source i saw this:
_AFXSOCK_INLINE BOOL CAsyncSocket::IOCtl(long lCommand, DWORD*
lpArgument)
{ *lpArgument = 0; return (SOCKET_ERROR != ioctlsocket(m_hSocket,
lCommand, lpArgument)); }
why is the *lpArgument = 0 there???
when i chekc in vc4.2 source it doesnt appear there...
what is going on?????????
thx
yair goldfinger
Mike Blaszczak -- mikeblas@nwlink.com
Sunday, November 10, 1996
At 23:17 11/10/96 +0200, yair wrote:
>Environment: VC++ 4.0, Win95/winNT4.0
>I have this weird probelm with mfc4.0
>i try to USE IOCtl on a TCP socket.
>now, when i use it with the FIONBIO option and parameter is 1 (turn
>non blocking mode on) the function always failed.
>when i look at the source i saw this:
>_AFXSOCK_INLINE BOOL CAsyncSocket::IOCtl(long lCommand, DWORD*
>lpArgument)
> { *lpArgument = 0; return (SOCKET_ERROR != ioctlsocket(m_hSocket,
>lCommand, lpArgument)); }
>why is the *lpArgument = 0 there???
>when i chekc in vc4.2 source it doesnt appear there...
It was removed as a bug fix.
>what is going on?????????
It was a bug. It was fixed. You're using an old version, so you still
have the bug.
You should upgrade to MFC 4.2b and Visual C++ 4.2. Even the most
recent release contains bug fixes to the CSocket and CAsyncSocket code.
.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.
| Вернуться в корень Архива
|