C++ Programming
04-09-2009, 11:31 AM
Hi all,
if i m using this code in Visual studio 2005 than its working fine but in case of visual studio 2008 its gives and exeception that is::
Unhandled exception at 0x755e21b3 in test.exe: 0xC0000005: Access violation reading ******** 0x0000000c.
code is like that,
SHELLEXECUTEINFOA TempInfo = {0};
TempInfo.cbSize = sizeof(SHELLEXECUTEINFOA);
TempInfo.fMask = 0;
TempInfo.hwnd = NULL;
TempInfo.lpVerb = "open";
TempInfo.lpFile = "calc.exe";
TempInfo.lpParameters = "";
TempInfo.lpDirectory = "";
TempInfo.nShow = SW_NORMAL;
BOOL tt= ::ShellExecuteExA(&TempInfo);
if(tt==TRUE)
{
AfxMessageBox("ShellExecute created successfully");
}
else
{
AfxMessageBox("ShellExecute not created");
}
please help me this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
if i m using this code in Visual studio 2005 than its working fine but in case of visual studio 2008 its gives and exeception that is::
Unhandled exception at 0x755e21b3 in test.exe: 0xC0000005: Access violation reading ******** 0x0000000c.
code is like that,
SHELLEXECUTEINFOA TempInfo = {0};
TempInfo.cbSize = sizeof(SHELLEXECUTEINFOA);
TempInfo.fMask = 0;
TempInfo.hwnd = NULL;
TempInfo.lpVerb = "open";
TempInfo.lpFile = "calc.exe";
TempInfo.lpParameters = "";
TempInfo.lpDirectory = "";
TempInfo.nShow = SW_NORMAL;
BOOL tt= ::ShellExecuteExA(&TempInfo);
if(tt==TRUE)
{
AfxMessageBox("ShellExecute created successfully");
}
else
{
AfxMessageBox("ShellExecute not created");
}
please help me this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.