Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Thread safe output.. Pin
TenFiftyTwo20-Aug-11 9:59
TenFiftyTwo20-Aug-11 9:59 
GeneralRe: Thread safe output.. Pin
Code-o-mat20-Aug-11 11:19
Code-o-mat20-Aug-11 11:19 
GeneralRe: Thread safe output.. Pin
TenFiftyTwo20-Aug-11 12:10
TenFiftyTwo20-Aug-11 12:10 
GeneralRe: Thread safe output.. Pin
Code-o-mat20-Aug-11 22:52
Code-o-mat20-Aug-11 22:52 
GeneralRe: Thread safe output.. Pin
TenFiftyTwo20-Aug-11 23:10
TenFiftyTwo20-Aug-11 23:10 
GeneralRe: Thread safe output.. Pin
Code-o-mat20-Aug-11 23:30
Code-o-mat20-Aug-11 23:30 
GeneralRe: Thread safe output.. Pin
TenFiftyTwo20-Aug-11 23:32
TenFiftyTwo20-Aug-11 23:32 
GeneralRe: Thread safe output.. Pin
Code-o-mat21-Aug-11 10:05
Code-o-mat21-Aug-11 10:05 
I have another idea that might or might not work. Since after running your ooRexx thing, it will write its output on the same console as your app, i guess it inherits its standard outputs from your process, so i was wondering, what would happen if you were to change your own process' standard output prior to calling the function that runs the ooRexx thingie and then changing it back to its original afterwards, this way the external process might inherit the changed output. So basicly:
-create named pipes (for stdout and/or stderr)
-set them as standard output/standard error for your own process (google for how to do this, maybe freopen with stdout/stderr can do this, not sure)
-call the method to run the ooRexx thing
-change your app's output back
-have a thread running that reads from the named pipes and does nothing more than writing what it got to your own process' original output with syncronization added.

How does this sound?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<

GeneralRe: Thread safe output.. Pin
TenFiftyTwo21-Aug-11 10:16
TenFiftyTwo21-Aug-11 10:16 
GeneralRe: Thread safe output.. [modified] Pin
Code-o-mat21-Aug-11 10:23
Code-o-mat21-Aug-11 10:23 
QuestionCRegKey::SetValue not function on Win 7 Pin
_Flaviu19-Aug-11 8:37
_Flaviu19-Aug-11 8:37 
AnswerRe: CRegKey::SetValue not function on Win 7 Pin
Richard MacCutchan19-Aug-11 9:23
mveRichard MacCutchan19-Aug-11 9:23 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
_Flaviu19-Aug-11 9:39
_Flaviu19-Aug-11 9:39 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
Richard Andrew x6419-Aug-11 11:43
professionalRichard Andrew x6419-Aug-11 11:43 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
Richard MacCutchan20-Aug-11 0:16
mveRichard MacCutchan20-Aug-11 0:16 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
_Flaviu20-Aug-11 2:42
_Flaviu20-Aug-11 2:42 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
Richard MacCutchan20-Aug-11 6:31
mveRichard MacCutchan20-Aug-11 6:31 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
Cheongwadae20-Aug-11 9:17
Cheongwadae20-Aug-11 9:17 
GeneralRe: CRegKey::SetValue not function on Win 7 Pin
_Flaviu22-Aug-11 19:26
_Flaviu22-Aug-11 19:26 
QuestionVisual studio 2005 (package load failure) Pin
lahatra19-Aug-11 7:48
lahatra19-Aug-11 7:48 
AnswerRe: Visual studio 2005 (package load failure) Pin
Richard MacCutchan19-Aug-11 9:20
mveRichard MacCutchan19-Aug-11 9:20 
QuestionHow to detect a winsock connection lost Pin
sirtimid19-Aug-11 5:53
sirtimid19-Aug-11 5:53 
AnswerCrosspost Pin
Richard MacCutchan19-Aug-11 6:39
mveRichard MacCutchan19-Aug-11 6:39 
QuestionVc6 have problem on Win 7 Pin
_Flaviu19-Aug-11 5:29
_Flaviu19-Aug-11 5:29 
AnswerRe: Vc6 have problem on Win 7 Pin
User 742933820-Aug-11 21:16
professionalUser 742933820-Aug-11 21:16 

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.