Click here to Skip to main content
15,904,156 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ ActiveX project worked with VB6, broken in later versions Pin
Richard MacCutchan22-Jul-17 20:29
mveRichard MacCutchan22-Jul-17 20:29 
GeneralRe: C++ ActiveX project worked with VB6, broken in later versions Pin
Burl Rice23-Jul-17 2:32
Burl Rice23-Jul-17 2:32 
GeneralRe: C++ ActiveX project worked with VB6, broken in later versions Pin
Richard MacCutchan23-Jul-17 2:54
mveRichard MacCutchan23-Jul-17 2:54 
GeneralRe: C++ ActiveX project worked with VB6, broken in later versions Pin
Burl Rice23-Jul-17 9:12
Burl Rice23-Jul-17 9:12 
QuestionClass Shape Pin
kumn1d22-Jul-17 9:05
kumn1d22-Jul-17 9:05 
AnswerRe: Class Shape Pin
Afzaal Ahmad Zeeshan22-Jul-17 10:00
professionalAfzaal Ahmad Zeeshan22-Jul-17 10:00 
AnswerRe: Class Shape Pin
_Flaviu23-Jul-17 23:42
_Flaviu23-Jul-17 23:42 
GeneralRe: Class Shape Pin
Richard MacCutchan23-Jul-17 23:58
mveRichard MacCutchan23-Jul-17 23:58 
AnswerRe: Class Shape Pin
Victor Nijegorodov24-Jul-17 22:38
Victor Nijegorodov24-Jul-17 22:38 
GeneralRe: Class Shape Pin
kumn1d25-Jul-17 8:52
kumn1d25-Jul-17 8:52 
QuestionRe: Class Shape Pin
David Crow25-Jul-17 2:23
David Crow25-Jul-17 2:23 
AnswerRe: Class Shape Pin
kumn1d25-Jul-17 8:51
kumn1d25-Jul-17 8:51 
QuestionRe: Class Shape Pin
David Crow25-Jul-17 10:15
David Crow25-Jul-17 10:15 
SuggestionEducational: my buffer scroll C++ working code. Pin
Member 132416522-Jul-17 0:31
Member 132416522-Jul-17 0:31 
GeneralRe: Educational: my buffer scroll C++ working code. Pin
Richard MacCutchan22-Jul-17 0:57
mveRichard MacCutchan22-Jul-17 0:57 
GeneralRe: Educational: my buffer scroll C++ working code. Pin
Member 132416522-Jul-17 5:19
Member 132416522-Jul-17 5:19 
GeneralRe: Educational: my buffer scroll C++ working code. Pin
leon de boer22-Jul-17 1:14
leon de boer22-Jul-17 1:14 
GeneralRe: Educational: my buffer scroll C++ working code. Pin
Member 132416522-Jul-17 5:09
Member 132416522-Jul-17 5:09 
QuestionCN Pin
Member 1332222821-Jul-17 7:58
Member 1332222821-Jul-17 7:58 
AnswerRe: CN Pin
Afzaal Ahmad Zeeshan21-Jul-17 9:12
professionalAfzaal Ahmad Zeeshan21-Jul-17 9:12 
AnswerRe: CN Pin
jeron121-Jul-17 9:34
jeron121-Jul-17 9:34 
AnswerRe: CN Pin
David Crow21-Jul-17 10:30
David Crow21-Jul-17 10:30 
QuestionDoes CString;;GetBufferSetLength Set/Allocate the CString Buffer Pin
ForNow20-Jul-17 15:55
ForNow20-Jul-17 15:55 
AnswerRe: Does CString;;GetBufferSetLength Set/Allocate the CString Buffer Pin
Richard MacCutchan20-Jul-17 20:34
mveRichard MacCutchan20-Jul-17 20:34 
AnswerRe: Does CString;;GetBufferSetLength Set/Allocate the CString Buffer Pin
Jochen Arndt20-Jul-17 21:00
professionalJochen Arndt20-Jul-17 21:00 
The CString class is not thread safe but using CAsyncSocket indicates that you are using multiple threads.

When using GetBuffer[Xxx], the string object is locked until ReleaseBuffer is called (which must be called from the same thread).

As Richard already noted, you need a byte buffer. While this can be achieved by using CStringA, I recommend to rethink your design. Don't use string classes for binary data and ensure thread safety.

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.