|
-
June 22nd, 2012, 09:22 AM
#15
Re: ShellExecute crashes Dev Studio 2008 SP 1
 Originally Posted by DeepT
Ok, this code block also crashes Dev Studio 2008 and has nothing to do with CStrings:
Code:
#define URL "https://www.google.com"
int Len = strlen(URL);
char Buff[1024] = {0};
CopyMemory( &Buff[0], URL, Len );
ShellExecute(NULL,_T("open"),Buff, NULL,NULL,SW_SHOW);
This code is wrong! 
Please, try what Paul suggested:
 Originally Posted by Paul McKenzie
Then create a brand new program, and just these two lines:
Code:
CString URL = _T("https://www.google.com");
ShellExecute(NULL,NULL, (LPCTSTR)URL, NULL,NULL,SW_SHOW);
Victor Nijegorodov
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
|