[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: correction::ldapsearch as own process

On Thu, Feb 24, 2000 at 04:04:34PM +0100, Mikael wrote:
> I managed to miss the ' \\ ' in the first argument
> (.\\bin\\ldapsearch.exe) in my previous question.
> I am trying to start the ldapsearch executable with the CreateProcess
> API command but I fail, ie
>     char commando[100];
>     strcpy(commando,".\\bin\\ldapsearch.exe  -b \"dc=envilogg,dc=se\"
>         -s base \"objectclass=*\" > d:/myldif999.ldf");

I'm not sure how NT works, but perhaps you cannot have stdout redirection in
the command line like this. Perhaps you will have to manually read a pipe
and output that, or use a command similar to the Unix system() function
(which on Unix, calls the command using "sh -c '<cmd>'").

/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`     bcollins@debian.org  --  bcollins@openldap.org  --  bmc@visi.net     '