Click here to Skip to main content
14,691,587 members
Home » Discussions » ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionProgram for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Member 1103323724-Aug-14 17:55
MemberMember 1103323724-Aug-14 17:55 
AnswerRe: Program for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Richard MacCutchan24-Aug-14 22:52
mveRichard MacCutchan24-Aug-14 22:52 
QuestionProgram for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Member 1103323724-Aug-14 17:38
MemberMember 1103323724-Aug-14 17:38 
AnswerRe: Program for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Richard MacCutchan24-Aug-14 22:52
mveRichard MacCutchan24-Aug-14 22:52 
Questionunexpected address value in WSABUF ( RESOLVED ) Pin
bkelly1311-Aug-14 14:34
Memberbkelly1311-Aug-14 14:34 
QuestionRe: unexpected address value in WSABUF Pin
Richard MacCutchan11-Aug-14 22:25
mveRichard MacCutchan11-Aug-14 22:25 
AnswerRe: unexpected address value in WSABUF Pin
bkelly1312-Aug-14 2:51
Memberbkelly1312-Aug-14 2:51 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 4:36
mveRichard MacCutchan12-Aug-14 4:36 
GeneralRe: unexpected address value in WSABUF Pin
bkelly1312-Aug-14 6:42
Memberbkelly1312-Aug-14 6: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 21:48
mveRichard MacCutchan12-Aug-14 21:48 
GeneralRe: unexpected address value in WSABUF Pin
bkelly1313-Aug-14 2:53
Memberbkelly1313-Aug-14 2:53 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 5:54
mveRichard MacCutchan12-Aug-14 5:54 
AnswerMoving on to WSASend Pin
bkelly1313-Aug-14 11:33
Memberbkelly1313-Aug-14 11:33 
GeneralRe: Moving on to WSASend Pin
Richard MacCutchan13-Aug-14 23:08
mveRichard MacCutchan13-Aug-14 23:08 
GeneralRe: Moving on to WSASend Pin
bkelly1314-Aug-14 4:19
Memberbkelly1314-Aug-14 4:19 
GeneralRe: Moving on to WSASend Pin
Richard MacCutchan14-Aug-14 4:30
mveRichard MacCutchan14-Aug-14 4:30 
GeneralRe: Moving on to WSASend Pin
bkelly1314-Aug-14 4:52
Memberbkelly1314-Aug-14 4:52 
QuestionCreating Classes in VS 2013 Pin
Bram van Kampen9-Aug-14 16:22
MemberBram van Kampen9-Aug-14 16:22 
AnswerRe: Creating Classes in VS 2013 Pin
Richard Andrew x649-Aug-14 18:50
professionalRichard Andrew x649-Aug-14 18:50 
Questionerror - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Swap95-Aug-14 22:40
MemberSwap95-Aug-14 22:40 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Richard MacCutchan5-Aug-14 23:34
mveRichard MacCutchan5-Aug-14 23:34 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Subrat 470826612-Sep-14 16:15
MemberSubrat 470826612-Sep-14 16:15 
Questionhow to let menu auto show next item when mouse on the bottom arrow of menu Pin
fengforky9-Jul-14 23:53
Memberfengforky9-Jul-14 23:53 
AnswerRe: how to let menu auto show next item when mouse on the bottom arrow of menu Pin
Richard MacCutchan10-Jul-14 0:34
mveRichard MacCutchan10-Jul-14 0:34 
QuestionWCHAR, wstring, initializing and accessing them (RESOLVED) Pin
bkelly131-Jul-14 11:13
Memberbkelly131-Jul-14 11:13 

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.