cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Simple question from Novice

From: Andrew Francis <locust_at_familyhealth.com.au>
Date: Mon, 26 Aug 2002 14:07:04 +0800 (WST)

On Fri, 23 Aug 2002, David Fogle wrote:
> I am attempting to use curl.exe to ftp a file to a Sever via the command
> line. Below is the command line that I’m using, which seems to work
> well.
>
> c:\curl.exe curl -s -T C:\Windows\Desktop\shy.doc -u myname:mypass
> ftp://myname.hypermart.net/saint/shy.doc
>
> My question is this. While curl is doing it’s thing, a DOS window
> opens up. How can I get this to run in the background, where it's not
> distracting the user?
>

curl is a console application, so by default Windows will allocate it
a console (unless it's run from a program inside another console, in
which case it will use that console by default).

How to avoid this depends on how you're invoking it. If you're using
CreateProcess(), I think you need to put DETACHED_PROCESS in the
dwCreationFlags - see msdn.microsoft.com for more details.

If you're coming from a higher level language (eg the "Shell" command
in Visual Basic), it might have it's own way of doing things. Or you
might need to use CreateProcess() instead.

Another option is to get your app to link with libcurl and call
functions inside it, instead of calling the curl command
line app.

Cheers

-- 
Andrew Francis
Software Developer
Family Health Network
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r
Received on 2002-08-26