hi
in the below code i am getting the c:\windows\Microsoft.Net\Framework\v2.0.057 to the buffer.Now i wnat to store the above value in doble quotes " c:\windows\Microsoft.Net\Framework\v2.0.057" and i want to pass this for the process. how to make this path in double quotes....
HINSTANCE hDLL = LoadLibrary(TEXT("mscoree.dll"));
FNPTR_GET_COR_SYS_DIR GetCORSystemDirectory = NULL;
GetCORSystemDirectory = (FNPTR_GET_COR_SYS_DIR) GetProcAddress (hDLL,"GetCORSystemDirectory");
if(GetCORSystemDirectory!=NULL)
{
WCHAR buffer[MAX_PATH + 1];
DWORD length;
HRESULT hr = GetCORSystemDirectory(buffer,MAX_PATH,&length);
std::string tbuf="\"buffer\"";
// std::string tbuf=" \""+(string)buffer+"\\InMageSQL.dll\" /codebase /tlb /silent";
if(S_OK==hr)
{
wcscat( buffer,L"RegAsm.exe" );
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) ); //(LPSTR)getcurrentpath.c_str()
if(!CreateProcess((LPCTSTR)buffer,(LPTSTR)strInMageSqlDll.c_str(),NULL, NULL,FALSE, 0,NULL,NULL,&si,&pi ) )
{
cout<<"CreateProcess failed "<<GetLastError()<<endl;
}