Convert command line cURL to C cURL
STARTUPINFO si = { sizeof(STARTUPINFO) };PROCESS_INFORMATION pi;TCHAR tempCmdLine[MAX_PATH];_tcscpy_s(tempCmdLine, MAX_PATH, _T("curl.exe http://localhost:8983/solr/update/extract?literal.id=doc2&uprefix=attr_&fmap.content=attr_content&commit=true -F myfile=@doc.pdf"));CreateProcess(NULL, tempCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
You may want to check the return value of CreateProcess
.