🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10733

Re: Displaying the console window from a DLL

#10733
From: Ed Mulroy [TeamB]
Date: Tue, 23 Mar 2004 00:05
37 lines
2675 bytes
I don't know why you can't make your console work.  A GUI program is
allowed to open one console.  Might LabView have one open?

In any case, I think your approach is more difficult than it need be.
Create a simple console app which also creates a window.  Hide the
window or just don't make it visible.
Use the window to communicate with your DLL with one to a bunch of
bytes at a time via the WM_COPYDATA message or one byte at a time by
using a custom message (RegisterWindowMessage).  You can use some
oddball words for the window caption to make it easy to find
(FindWindow).  If you want to communicate back from the console to the
DLL then have the DLL also create a hidden window.

Is LabView the same as it used to be?  At one time the joke was that
you could tell a programmer who worked with LabView by the bottles of
aspirin and antacids he brought with him. <g>

.  Ed

> p Anders wrote in message
> news:405f5103$1@newsgroups.borland.com...
> Can anyone tell me if this can be done?
>
> The basic idea is that I have an application created in
> LabView (a 3rd party product) and I am trying to
> interface that with some communications software
> that is written in C++.  The C++ software has an
> "Application" class that writes messages to the console,
> essentially keep me informed as to the current program
> state.  I'd like to utilize this console window from within
> the DLL so I can see my program information that's going
> on inside the DLL.
>
> I have the DLL working but I can't get the console window to
> show up.  Does this have anything to do with not having a
> "main" that acts as the entry point to my application that
> creates a visible console?
Technical Details
Message-ID: <405f7f59$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <405f5103$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,88f1324ce9517901
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-03-22 16:10:09 PST
From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <405f5103$1@newsgroups.borland.com>
Subject: Re: Displaying the console window from a DLL
Date: Mon, 22 Mar 2004 19:05:33 -0500
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 24.74.175.102
Message-ID: <405f7f59$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1080000345 24.74.175.102 (22 Mar 2004 16:05:45 -0800)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail