|
-
May 3rd, 1999, 07:01 PM
#1
how do i convert const char* to a char*???
void CInstallorUninstallDlg::RunAnother(CString FileName, CString Param)
{// begin RunAnother
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si,sizeof(si));
si.cb = sizeof(si);
//LPCTSTR str = SetLPCSTR(Param);
if(!CreateProcess(FileName,Param,NULL,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
{
AfxMessageBox("CreateProcess failed");
return;
}
}// end RunAnother
void CInstallorUninstallDlg::InstallSoundFiles()
{// begin InstallSoundFiles
LPCTSTR par = "/r data\\*.drs modpack\\" + name +"\\sou?????.wav /s";
RunAnother("drsbuild.exe",par);
}// end InstallSoundFiles
My problem is that the second Parameter of the CreateProcess function takes a char* and not a const char* and i want to use it in a function to run a command line program that the folder CString name changes every time the function is called, but do not know how to convert it to a char*. Any help is greatly apperciated. Thanks ahead of time.
Anish Mistry
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|