Click here to Skip to main content
15,887,027 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: how to close document handle Pin
Richard MacCutchan26-Jan-11 22:36
mveRichard MacCutchan26-Jan-11 22:36 
QuestionConnections points and clients and really hot chicks Pin
Jim Crafton19-Jan-11 7:42
Jim Crafton19-Jan-11 7:42 
AnswerRe: Connections points and clients and really hot chicks Pin
cariolihome19-Jan-11 12:32
cariolihome19-Jan-11 12:32 
QuestionCocoa or Qt4? Pin
Daniel Stefanovski19-Jan-11 5:14
Daniel Stefanovski19-Jan-11 5:14 
AnswerRe: Cocoa or Qt4? Pin
Steve Maier19-Jan-11 5:38
professionalSteve Maier19-Jan-11 5:38 
QuestionHow to identify the change in SQL database using MFC Pin
ganesh_IT18-Jan-11 19:53
ganesh_IT18-Jan-11 19:53 
Questioninterthread messaging in VS/c/c++ Pin
Alan Kurlansky12-Jan-11 11:33
Alan Kurlansky12-Jan-11 11:33 
AnswerRe: interthread messaging in VS/c/c++ Pin
User 742933812-Jan-11 12:29
professionalUser 742933812-Jan-11 12:29 
Say you have a structure like so, accessible by both threads as a global variable:
typedef struct {
    void *data;
    void *next_block;
}block;


The idea is to have a list of data blocks, each with a pointer to the data to be written to file, and a pointer to the next data block to be written.

The sender thread will do its work, and every time data has been generated, it will allocate a new block and add its address to the next_block member of the previously last block. The next_block member of the newly added block is set to null.

The receiver/writer thread will start at the beginning of the array and continuously check if next_block has been changed from a null-pointer to something else. When it's no longer null, the sender thread must have added data. This new data is written to file and may be free'd in memory. The block struct which data was written before this block's data may also be free'd now.
After this, the check loop on next_block will continue, based on the last written block.

modified 13-Sep-18 21:01pm.

GeneralRe: interthread messaging in VS/c/c++ Pin
Alan Kurlansky13-Jan-11 3:00
Alan Kurlansky13-Jan-11 3:00 
AnswerRe: interthread messaging in VS/c/c++ Pin
User 742933813-Jan-11 5:00
professionalUser 742933813-Jan-11 5:00 
QuestionBest way to convert from std::wstring to std::string? Pin
David O'Neil8-Jan-11 8:10
professionalDavid O'Neil8-Jan-11 8:10 
AnswerRe: Best way to convert from std::wstring to std::string? [modified] Pin
David O'Neil8-Jan-11 17:32
professionalDavid O'Neil8-Jan-11 17:32 
AnswerRe: Best way to convert from std::wstring to std::string? Pin
«_Superman_»10-Jan-11 7:42
professional«_Superman_»10-Jan-11 7:42 
GeneralRe: Best way to convert from std::wstring to std::string? Pin
David O'Neil10-Jan-11 11:20
professionalDavid O'Neil10-Jan-11 11:20 
GeneralRe: Best way to convert from std::wstring to std::string? Pin
jk chan14-Jan-11 4:46
jk chan14-Jan-11 4:46 
GeneralRe: Best way to convert from std::wstring to std::string? Pin
«_Superman_»14-Jan-11 7:05
professional«_Superman_»14-Jan-11 7:05 
QuestionWhat is meant by "STL Relational Database" programming? Pin
Xpnctoc7-Jan-11 5:04
Xpnctoc7-Jan-11 5:04 
AnswerRe: What is meant by "STL Relational Database" programming? Pin
Richard MacCutchan7-Jan-11 5:33
mveRichard MacCutchan7-Jan-11 5:33 
GeneralRe: What is meant by "STL Relational Database" programming? Pin
Xpnctoc7-Jan-11 5:40
Xpnctoc7-Jan-11 5:40 
Questiondialog not modal Pin
MrKBA6-Jan-11 0:19
MrKBA6-Jan-11 0:19 
AnswerRe: dialog not modal Pin
Cool_Dev6-Jan-11 3:58
Cool_Dev6-Jan-11 3:58 
GeneralRe: dialog not modal Pin
MrKBA6-Jan-11 21:49
MrKBA6-Jan-11 21:49 
QuestionChanging the style of a DateTimePicker Pin
Jim Crafton5-Jan-11 4:35
Jim Crafton5-Jan-11 4:35 
AnswerRe: Changing the style of a DateTimePicker Pin
User 74293387-Jan-11 12:17
professionalUser 74293387-Jan-11 12:17 
GeneralRe: Changing the style of a DateTimePicker Pin
Jim Crafton7-Jan-11 14:36
Jim Crafton7-Jan-11 14:36 

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.