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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Where does STDOUT go when an external DLL is run?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

dlw21

USA
18 Posts

Posted - 12/11/2002 :  3:00:02 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

eparent

118 Posts

Posted - 12/11/2002 :  4:58:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.


Go to Top of Page

cpyang

USA
1406 Posts

Posted - 12/11/2002 :  11:37:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000