De ce nu folosesti CreateProcessA in loc de default-ul CreateProcess (care defaults to CreateProcessW), care probabil ti se trage de la faptul ca ai setat flag-ul de Unicode in VS.<div><br></div><div>Claudiu<br><br><div class="gmail_quote">
2012/3/9 Mihail Costea <span dir="ltr"><<a href="mailto:mihail.costea90@gmail.com">mihail.costea90@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Salut,<div><br></div><div>Rulez asta:</div><div><div>bRet = CreateProcess( NULL, /* No module name */</div><div><span style="white-space:pre-wrap">                        </span> command->verb->string , /* Command line */</div>
<div><span style="white-space:pre-wrap">                        </span> NULL, /* Process handle not inheritable */</div><div><span style="white-space:pre-wrap">                        </span> NULL, /* Thread handle not inheritable */</div>
<div><span style="white-space:pre-wrap">                        </span> FALSE, /* Set handle inheritance */</div><div><span style="white-space:pre-wrap">                        </span> 0, /* No creation flags */</div>
<div><span style="white-space:pre-wrap">                        </span> NULL, /* Use parent's environment block */</div><div><span style="white-space:pre-wrap">                        </span> NULL, /* Use parent's starting directory */</div>
<div><span style="white-space:pre-wrap">                        </span> &si, /* Pointer to STARTUPINFO structure */</div><div><span style="white-space:pre-wrap">                        </span> &pi); /* Pointer to PROCESS_INFORMATION */</div>
</div><div><br></div><div>Si primesc eroarea asta:</div><div>c:\users\student\desktop\tema1\minishell.cpp(160): error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'const char *' to 'LPWSTR'</div>
<div>Pica de la acel command->verb->string.</div><div><br></div><div>Am incercat diverse solutii de pe internet dar nu am reusit nimic. Pe Linux totul imi merge bine si frumos, dar aici un amarat de CreateProcess nu functioneaza.</div>
<div>Nervii imi ajung la maxim, ca si-au gasit unii sa faca rescriere de toate tipurile de variabile posibile ca apoi sa nu mai mearga nimic.</div><div>Daca cineva ma poate ajuta as fi fericit. Folosesc masina virtuala de la laborator.</div>
<div><br></div><div>Mihai</div><span class="HOEnZb"><font color="#888888"><div><br clear="all"><div><br></div>-- <br>Mihail Costea<div>E-mail : <a href="mailto:mihail.costea90@gmail.com" target="_blank">mihail.costea90@gmail.com</a></div>
<div>Telephone : <a href="tel:%2B40725245085" value="+40725245085" target="_blank">+40725245085</a></div>
<br>
</div>
</font></span><br>_______________________________________________<br>
<a href="http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii" target="_blank">http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii</a><br></blockquote></div><br></div>