in reply to Making a perl program look like a regular file on Win32?

I am assuming that your EXE is already compiled and doesn't support piped data (already mentioned as a good method). I am also assuming that the EXE works with the CSV from either a known location or a location passed on the command line. You can always run the EXE from a CMD file that executes your Perl App first before running your EXE. The Perl app simply writes the CSV file to a location that is known to the EXE.

You can even play around with the Windows shortcut that launches the app so that the icon looks like the original EXE's. The users will see the CMD window for the duration of the Perl scripts execution.

rem A command file that runs a Perl app before running a windows App. perl camel.pl start winldap.exe

Replies are listed 'Best First'.
Re: Re: Making a perl program look like a regular file on Win32?
by SmugX (Beadle) on Mar 03, 2004 at 12:42 UTC

    Thanks for all your comments.

    Roger, yes, your "insane" suggestion is along the lines that I was thinking. :-) However, I fear the Windows Driver Dev Kits may be a little beyond my Perl dev skills. :-( (I will go on the hunt for software that may achieve this, however.)

    The pipe suggestions would normally be ideal, but don't work for my specific circumstance. Basically, the DOS app runs continually, but periodically reads the file which I want to intercept access to. (My fault for not detailing that in my problem description!)

    You have all given me food-for-thought, however, and I will renew my searching and go read up on named pipes!

    Many thanks, Neil

      I've had good luck with feeding DOS apps UNC names (\\system\file) in the past, if you can make the file being read a UNC filename then host it on a separate box.

      This "separate box" being a Unix machine using Samba (or some other file sharing system). The "file" can then be a unix named pipe as mentioned in previous responses, or you can hack samba directly to run programs to generate I/O to fill this "file" as it's being served out.

      Well, I mean as long as we're talking insane ideas....