Dear all ,
I need to Open a folder and i used this code as sample and its working well
PROCESS_INFORMATION ProcessInfo = {0};
STARTUPINFO StartupInfo = {0};
BOOL result =CreateProcess(_T("C:\\Windows\\explorer.exe"),
_T("/e,/root,F:\\Images\\Car\\AUDI"),
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&StartupInfo,
&ProcessInfo);
but i need to pass the Folder path so i coded like this and it not worked.Can you Fix it
CString s0="F:\Images\Car\AUDI";
CString s1=_T(" /e,/root,");
CString s2=s0+s1;
s2.Replace(_T("\\"),_T("\\\\"));
CString s3=_T("\"")+s2+_T("\"");
LPWSTR pointer=(LPTSTR)(LPCTSTR)s3;
PROCESS_INFORMATION ProcessInfo = {0};
STARTUPINFO StartupInfo = {0};
BOOL result = CreateProcess(
_T("C:\\Windows\\explorer.exe"),
pointer,
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&StartupInfo,
&ProcessInfo);
Thanks
Jay