473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

pipe-out from dll library

The program I wrote has two parts. A main program (win forms, UI..)
and a ftp client dll library using TCPclient, this includes methods
such as connect, list, retr, disconnect...
I would like to pipe-out command status from the dll class library to a
text box in the main program.

Console.WriteLine(myCommand);
Console.WriteLine(servResponse);

I currently use Console.WriteLine in the class library and was able to
see the output in the Output Box in visual studio. How can I get that
information to display in the textbox in the main program? (pass that
information from the dll)

Thanks.

Nov 17 '05 #1
1 1668
You can redirect process output to the StreamReader and then get the data
from the stream and output it to the text box
( http://www.differentpla.net/node/view/386 )
but you will have to start your process from code.

Another solution is that you will set the output stream manually for the
console class. It can be done via its static member Console.SetOut(...)
(
http://msdn.microsoft.com/library/de...ssouttopic.asp )

Watch for the word wraps

--
Vadym Stetsyak aka Vadmyst

"Howard" <ho*******@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
The program I wrote has two parts. A main program (win forms, UI..)
and a ftp client dll library using TCPclient, this includes methods
such as connect, list, retr, disconnect...
I would like to pipe-out command status from the dll class library to a
text box in the main program.

Console.WriteLine(myCommand);
Console.WriteLine(servResponse);

I currently use Console.WriteLine in the class library and was able to
see the output in the Output Box in visual studio. How can I get that
information to display in the textbox in the main program? (pass that
information from the dll)

Thanks.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bernhard Kuemel | last post by:
Hi! I want to read/write commands and program input to/from /bin/bash several times before I close the stdin pipe. However, reading from cat hangs unless I first close the stdin pipe. <?php...
1
by: Brad Murdoch | last post by:
im trying to run the select.selct() on a unix pipe, my expectation is that it will block untill there is something there to read, then continue. It seems to do this untill the pipe is written to...
7
by: Greg | last post by:
I am trying to implement the UNIX pipe command using C but with the "->" operator. Everything works fine with 1 pipe, but when I try to use 2 or more, it hangs up when reading the pipe_in...
4
by: bill | last post by:
I am confused by the behavior of the following code. The function copy() takes two FILE *'s and copies the data from one to the other. In the main routine, I create a pipe and copy stdin to the...
0
by: Nick | last post by:
hi,all I have a question about named pipe. How does the pipe server know the client closed the connection? We can refer the example for CreateNamedPipe() function in MSDN. In block mode, once...
2
by: FB's .NET Dev PC | last post by:
I am writing two services in VB.NET, one of which needs to send text strings to the other. After reading, I decided (perhaps incorrectly) that named pipes would be the best interprocess...
0
by: olaf.dietsche | last post by:
Hi, The system is Windows XP and DB2 v8.1.7. I'm trying to load a text file via named pipe into a table. I have two programs: the first program creates the named pipe, waits for a client...
0
by: Jean-Paul Calderone | last post by:
On Sun, 1 Jun 2008 07:32:39 -0700 (PDT), Leon zhang <leoncamel@gmail.comwrote: file.read() reads the entire contents of the file. Your code never closes the write end of the pipe, so the read...
3
by: Jeremy Sanders | last post by:
Hi - I have some code which works under linux. It starts a remote python process using subprocess and communicates to it via a pipe created by os.pipe. As far as I understand, child processes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.