On Tue, 16 Jul 2002, DOLIST Technical Center wrote:

>
> Hello,
>
> I tried to do a little filter in C.
> First I trying to deal with arguments sent back to the executable, but
> there's something wrong and cannot figure out yet why:
>
> in filters folder, I'm my .tab file I have:
>
> "D:\services_ip\xmail\MailRoot\xscanner\xscanner.exe"   
>"D:\services_ip\xmail\MailRoot\xscanner\"       "@@FILE"
>
> In the C code when I do:
>
> int main(int argc,char *argv[]) {
>   {...}
>    sprintf(Buffer,"D:\\services_ip\\xmail\\MailRoot\\bin\\xscanner.log");
>   fLog=fopen(Buffer,"at");
>
>   if (fLog!=NULL) fprintf(fLog,"Start - [%s] [%s] [%s] 
>[%s]\n",argv[0],argv[1],argv[2],argv[3]);
>
> The result is :
>
> Start - [D:\services_ip\xmail\MailRoot\xscanner\xscanner.exe] 
>[D:\services_ip\xmail\MailRoot\xscanner" 
>d:\services_ip\xmail\mailroot\spool\4\18\mess\1026837312619.3516.circle]
> Start - [D:\services_ip\xmail\MailRoot\xscanner\xscanner.exe] 
>[D:\services_ip\xmail\MailRoot\xscanner" 
>d:\services_ip\xmail\mailroot\spool\20\17\mess\1026837323864.3700.circle]
> Start - [D:\services_ip\xmail\MailRoot\xscanner\xscanner.exe] 
>[D:\services_ip\xmail\MailRoot\xscanner" 
>d:\services_ip\xmail\mailroot\spool\17\21\mess\1026837360086.3492.circle]
> Start - [D:\services_ip\xmail\MailRoot\xscanner\xscanner.exe] 
>[D:\services_ip\xmail\MailRoot\xscanner" 
>d:\services_ip\xmail\mailroot\spool\1\16\mess\1026837390343.336.circle]
>
> As you can see, in the second argument before the first space, there
> is a '"' instead of a '\'. And the argument 1 & 2 in the .TAB file
> seems to be mixed in the 1 in the C result.
>
> Did I have missed something or done something wrong?

it's very likely that CreateProcess() merges \" to "




- Davide


-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to