The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Where does STDOUT go when an external DLL is run?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
dlw21 Posted - 12/11/2002 : 3:00:02 PM
I have some code that is compiled into a DLL which I have loaded into my OriginC code. It seems to work fine, except I have a situation now where I would like to print some informational messages to stdout. Neither printf() nor std::cout statements generate any text inside the Origin script window or the console in the Code Builder.

Is what I am doing even possible? Are there any workarounds? I am not an MFC or VC++ guru by any means, so any advice would be appreciated. All I am trying to do is generate some simple messages so I can monitor the running conditions inside my external code while it is under development.

I am using VC++ v6.0 to generate the DLL, and OriginPro 7SR2.

TIA

2   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 12/11/2002 : 11:37:28 PM
In the upcoming service release, the GetWindow function will be able to return window handle to the various windows in Origin, like the script window, the results log etc. You can then pass the Origin window handle into your DLL as an argument (HWND) and use windows' API call like SendMessage to put text into these various windows.

CP


eparent Posted - 12/11/2002 : 4:58:31 PM
The printf and cout will not output to Origin's script windows.
I suggest your DLL brings up its own simple window. This simple window could contain a ProgressBar, listbox, or multiline editbox control for you to send updates to. Origin C can pass Origin's window handle if you want your window to be a child or Origin.



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000