ATL / WTL / STL
Your last post is proving very helpful. I have made many steps forward. Now I arrive near the final stage of getting my syntax correct.
Class C_TCP_API_Server handles all the details of sending data to a client. The data originates with these two declarations:
WSABUF wsabuf_array[ TCP_SERVER_PACKET_BUFFER_SIZE ];
There will be 16 buffers and p_lpwsabuf is initialized with:
m_common_data.p_lpwsabuf = m_common_data.wsabuf_array
Deep down in the send class is:
m_send_status = WSASend(
mp_lpwsabuf[ *mp_send_array_index ],
1, // one buffer for now
NULL, // I will add this later
NULL, // no flags
m_overlapped[ *mp_send_array_index ],
NULL ); // no completion routine
where mp_lpwsabuff is declared as
And its value is traced back to the first declaration shown above. The problem is this compiler error:
Quote:1>d:\bryan\common_code\c_tcp_api_server.cpp(1124): error C2664: 'WSASend' : cannot convert parameter 2 from '_WSABUF' to 'LPWSABUF'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Parameter two is declared as LPWSABUF. WSASend has LPWSABUF as its second argument. I do not understand why the compiler wants to convert from _WSABUF to LPWSABUF.
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.