Click here to Skip to main content
15,888,984 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionRe: unexpected address value in WSABUF Pin
Richard MacCutchan11-Aug-14 21:25
mveRichard MacCutchan11-Aug-14 21:25 
AnswerRe: unexpected address value in WSABUF Pin
bkelly1312-Aug-14 1:51
bkelly1312-Aug-14 1:51 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 3:36
mveRichard MacCutchan12-Aug-14 3:36 
GeneralRe: unexpected address value in WSABUF Pin
bkelly1312-Aug-14 5:42
bkelly1312-Aug-14 5:42 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 20:48
mveRichard MacCutchan12-Aug-14 20:48 
GeneralRe: unexpected address value in WSABUF Pin
bkelly1313-Aug-14 1:53
bkelly1313-Aug-14 1:53 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 4:54
mveRichard MacCutchan12-Aug-14 4:54 
AnswerMoving on to WSASend Pin
bkelly1313-Aug-14 10:33
bkelly1313-Aug-14 10:33 
Hello Richard,
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 ];
LPWSABUF p_lpwsabuf;

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:
VB
m_send_status = WSASend(
            m_client_socket,
            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
LPWSABUF   mp_lpwsabuf;

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


GeneralRe: Moving on to WSASend Pin
Richard MacCutchan13-Aug-14 22:08
mveRichard MacCutchan13-Aug-14 22:08 
GeneralRe: Moving on to WSASend Pin
bkelly1314-Aug-14 3:19
bkelly1314-Aug-14 3:19 
GeneralRe: Moving on to WSASend Pin
Richard MacCutchan14-Aug-14 3:30
mveRichard MacCutchan14-Aug-14 3:30 
GeneralRe: Moving on to WSASend Pin
bkelly1314-Aug-14 3:52
bkelly1314-Aug-14 3:52 
QuestionCreating Classes in VS 2013 Pin
Bram van Kampen9-Aug-14 15:22
Bram van Kampen9-Aug-14 15:22 
AnswerRe: Creating Classes in VS 2013 Pin
Richard Andrew x649-Aug-14 17:50
professionalRichard Andrew x649-Aug-14 17:50 
Questionerror - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Swap95-Aug-14 21:40
Swap95-Aug-14 21:40 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Richard MacCutchan5-Aug-14 22:34
mveRichard MacCutchan5-Aug-14 22:34 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Subrat 470826612-Sep-14 15:15
Subrat 470826612-Sep-14 15:15 
Questionhow to let menu auto show next item when mouse on the bottom arrow of menu Pin
fengforky9-Jul-14 22:53
fengforky9-Jul-14 22:53 
AnswerRe: how to let menu auto show next item when mouse on the bottom arrow of menu Pin
Richard MacCutchan9-Jul-14 23:34
mveRichard MacCutchan9-Jul-14 23:34 
QuestionWCHAR, wstring, initializing and accessing them (RESOLVED) Pin
bkelly131-Jul-14 10:13
bkelly131-Jul-14 10:13 
AnswerRe: WCHAR, wstring, initializing and accessing them Pin
Richard MacCutchan2-Jul-14 5:38
mveRichard MacCutchan2-Jul-14 5:38 
Generalnarrowing the focus a bit Pin
bkelly132-Jul-14 9:59
bkelly132-Jul-14 9:59 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan2-Jul-14 13:32
mveRichard MacCutchan2-Jul-14 13:32 
GeneralRe: narrowing the focus a bit Pin
bkelly132-Jul-14 17:00
bkelly132-Jul-14 17:00 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan3-Jul-14 4:17
mveRichard MacCutchan3-Jul-14 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.