GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Dec-2006, 23:58
sharikon sharikon is offline
New Member
 
Join Date: Dec 2006
Posts: 11
sharikon is on a distinguished road

running my programs EXE from VB will not "printf" to screen


i have written a program in C and it works fine when i run its EXE from Windows Command Line (cmd) or just double click it.

but from unknown reason (unknown for me that is) when i run it from a different program i have written in Visual Basic it will not print to screen while it will do its job perfectly.

this is my code in VB

ArgumentString_Processing = CSVPathString & "\ " & Mid(Extraction_tmpList.Item(j), 5, 4) & " " & Extraction_tmpList.Item(j)

Process.Start(EXEPathString & "Proc20.exe", ArgumentString_Processing)

the "Proc20.exe" is the program i wrote in C

again, it works fine but will not write anything in the window like it would if i run its EXE from the windows cmd or double click

in the C program i used "printf" through-out the code.

any help / thoughts would be appriciated .

thanks
  #2  
Old 18-Dec-2006, 03:08
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,373
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: running my programs EXE from VB will not "printf" to screen


VB does not run in a console window, therefore the output won't be displayed in the VB window. The progam is probably opening a console window to run, and when the program exits, the window closes. Try adding getchar() to the bottom of your program just before the return statement.
__________________

The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
  #3  
Old 18-Dec-2006, 05:47
sharikon sharikon is offline
New Member
 
Join Date: Dec 2006
Posts: 11
sharikon is on a distinguished road

Re: running my programs EXE from VB will not "printf" to screen


yes the VB program opens a console window to run
i tried "getch()" i tried fprintf(stdout,"text") tried cout<< "text" , nothing...
  #4  
Old 18-Dec-2006, 07:29
sharikon sharikon is offline
New Member
 
Join Date: Dec 2006
Posts: 11
sharikon is on a distinguished road

Re: running my programs EXE from VB will not "printf" to screen


i am so so stupid...!!!! after all the testings i made i just needed to use cprintf and chage the color with textcolor !!!!
weird!
the most obvuise solution is always right there where you would least expect it...
this thread is solved, thanks everyone.
 
 

Recent GIDBlogProblems with the Navy (Officers) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with a console menu system BullBuchanan C++ Forum 6 20-Aug-2006 14:46
win32 file opening and running other programs Tomb332 C++ Forum 1 17-Aug-2006 08:53

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:31.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.