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

ATL / WTL / STL

 
AnswerRe: Program for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Richard MacCutchan24-Aug-14 21:52
mveRichard MacCutchan24-Aug-14 21:52 
QuestionProgram for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Member 1103323724-Aug-14 16:38
Member 1103323724-Aug-14 16:38 
AnswerRe: Program for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Richard MacCutchan24-Aug-14 21:52
mveRichard MacCutchan24-Aug-14 21:52 
Questionunexpected address value in WSABUF ( RESOLVED ) Pin
bkelly1311-Aug-14 13:34
bkelly1311-Aug-14 13:34 
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 
I am expecting an array of structures. The MS page shows this:
typedef struct __WSABUF { u_long len; char FAR *buf; } WSABUF, *LPWSABUF; 

I am uncertain as to how the phrase ..;., *LPWSABUF; is read.
The line of code in question is an assignment to:
m_common_data.p_lpwsabuf_array[ i ]->buf 

When I get here:
m_common_data.p_lpwsabuf_array[ i ]

and type in the two characters ->
Intellisense prompts me for the fields len and buf. I interpert that as saying Intellisens interperts the declaration as an array of structure, each of which has a pointer to the data to be sent.
But when I try to show the address of the buf pointer, (not the value of the pointer, but the address of where the pointer is held in the structure), the debugger provides an address of 4. Since that is a contradition, there is something I am misinterperting.

Edit: I should change the name from p_lpwsabuf_array to lpwsabuf_array as the intent is an array of structure. The p_ prefix is misleading.

EDIT: She key here seems to be that I don't know how to read the declaration of WSABUF, *LPWSABUF. I tried using an array of WSABUF but WSASend demands LPWSABUF. When I use that in the declaration I am unable to assign an address to the ->buf pointer. If the original declaration is WSABUF, how is that cast to LPWSABUF so WSASend will accept it? If the other way around, how is the code to be changed to assign an address to ->buf in the code I posted?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com



modified 12-Aug-14 19:33pm.

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 
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 

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.