Problem running C application that prints from Forms 6

From: Álvaro Palma Aste <queria_direccion_at_el.perla.invalid>
Date: Mon, 15 Jul 2002 18:08:29 +0000 (UTC)
Message-ID: <agv32t$9u1$4_at_localhost.localdomain>



I´ve developed an application in Forms that generates a text file, and also I need to print this file directly to printer (network printer attached to every PC as LPT1). To do this, I made a little program in C that print the file to PRN, using :

printer = fopen("PRN","w");

fprintf(printer,"any variable",....):

When I run this one from the RUN menu in Windows, it works fine, but if I run it from Forms through DDE.App_Begin, Host or Win_Api_Shell.WinExec, I get a null pointer as the return value for the printer descriptor. I think that this is caused by some enviromental variable lost, so my question is:

Does anybody knows how can I get that Forms recognize PRN as LPT1? Thanks a lot for your answers

-- 
Atte.
Álvaro Palma Aste
Grupo de Ing. Biomédica
Depto. de Ing. Eléctrica - U. de Chile
******************************************************
It's the only form of protest they're allowed 
I've seen their silent faces scream so loud 
If they were to speak these words they'd go missing too 
Another woman on a torture table what else can they do

Sting - They Dance Alone...
Received on Mon Jul 15 2002 - 20:08:29 CEST

Original text of this message