Click here to Skip to main content
15,886,689 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionSQL Server Compact Edition Pin
Haakon S.11-Feb-13 4:23
Haakon S.11-Feb-13 4:23 
AnswerRe: SQL Server Compact Edition Pin
Richard MacCutchan11-Feb-13 4:42
mveRichard MacCutchan11-Feb-13 4:42 
GeneralRe: SQL Server Compact Edition Pin
Haakon S.11-Feb-13 5:37
Haakon S.11-Feb-13 5:37 
GeneralRe: SQL Server Compact Edition Pin
Richard MacCutchan11-Feb-13 5:58
mveRichard MacCutchan11-Feb-13 5:58 
Questionerror while trying to uplaod the file in current directory using c language Pin
raghvendrapanda30-Jan-13 19:34
raghvendrapanda30-Jan-13 19:34 
AnswerRe: error while trying to uplaod the file in current directory using c language Pin
Richard MacCutchan30-Jan-13 22:03
mveRichard MacCutchan30-Jan-13 22:03 
AnswerRe: error while trying to uplaod the file in current directory using c language Pin
«_Superman_»1-Feb-13 20:34
professional«_Superman_»1-Feb-13 20:34 
QuestionTCP/IP CAsyncSocket and pointers to same Pin
bkelly1324-Jan-13 15:16
bkelly1324-Jan-13 15:16 
Environment Windows XP and 7, Visual Studio 2008, C++.
Experience level: novice with TCP/IP, but do have the application working with CAsyncSocket.

The message application receives telemetry data from some hardware (arrives fast and furious), processes it and dispatches the results to a display device via TCP/IP. It sends the data to the client but does not receive from the client.

Setup: the TCP “Manager” is started by the main application and it listens for the client. On connect, it creates the “Sender” that does all the sending.

Question: what is the best, read that simple and maintainable, way for the manager to get the Sender pointer to the main application so it can use the Sender? When the client closes the connection, how is the application informed of that?

Tentative proposal: the application provides the Manager with a pointer to itself. When the connect is made the Manager calls an application method such as
Set_TCP_Sender_Pointer( C_Sender_Class *new_sender_pointer );

The Manager can pass the pointer (to the main application) to the Sender on creation. When the Sender gets a close from the client, it calls the same method using a NULL for the argument. This makes the application aware there is no Sender. Then the Sender exits. (There is only one thread so I think there is no concern about the application using a pointer to a non-existent Sender.)

I am pretty sure that will work, but if you had to pick up on this project, would it be easy to understand and maintain? Presume you are not an expert with TCP/IP in the Microsoft world.
I am open to alternative suggestions.

Thanks for your time
Answerclasses don't call upwards Pin
bkelly1326-Jan-13 8:55
bkelly1326-Jan-13 8:55 
QuestionATL and exceptions Pin
imagiro14-Jan-13 8:10
imagiro14-Jan-13 8:10 
AnswerRe: ATL and exceptions Pin
Jonathan Davies18-Jan-13 9:39
Jonathan Davies18-Jan-13 9:39 
AnswerRe: ATL and exceptions Pin
bkelly1324-Jan-13 15:24
bkelly1324-Jan-13 15:24 
GeneralRe: ATL and exceptions Pin
Jonathan Davies6-Feb-13 7:23
Jonathan Davies6-Feb-13 7:23 
GeneralRe: ATL and exceptions Pin
Albert Holguin11-Feb-13 5:12
professionalAlbert Holguin11-Feb-13 5:12 
Questionunicode and non-unicode Pin
bkelly1314-Jan-13 3:45
bkelly1314-Jan-13 3:45 
AnswerRe: unicode and non-unicode Pin
Richard MacCutchan14-Jan-13 6:24
mveRichard MacCutchan14-Jan-13 6:24 
GeneralRe: unicode and non-unicode Pin
bkelly1314-Jan-13 8:43
bkelly1314-Jan-13 8:43 
GeneralRe: unicode and non-unicode Pin
Richard MacCutchan14-Jan-13 22:13
mveRichard MacCutchan14-Jan-13 22:13 
GeneralRe: unicode and non-unicode Pin
Richard MacCutchan20-Jan-13 22:08
mveRichard MacCutchan20-Jan-13 22:08 
AnswerRe: unicode and non-unicode Pin
pasztorpisti20-Jan-13 1:33
pasztorpisti20-Jan-13 1:33 
GeneralRe: unicode and non-unicode Pin
bkelly1320-Jan-13 8:56
bkelly1320-Jan-13 8:56 
GeneralRe: unicode and non-unicode Pin
pasztorpisti20-Jan-13 10:45
pasztorpisti20-Jan-13 10:45 
AnswerRe: unicode and non-unicode Pin
Albert Holguin11-Feb-13 5:10
professionalAlbert Holguin11-Feb-13 5:10 
Questionsqlconfigdatasource fails on 64 bit from 64 application Pin
MrKBA10-Jan-13 23:02
MrKBA10-Jan-13 23:02 
AnswerRe: sqlconfigdatasource fails on 64 bit from 64 application Pin
Richard MacCutchan10-Jan-13 23:10
mveRichard MacCutchan10-Jan-13 23:10 

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.