Advertisement
Advertisement
| 07.24.2008 at 01:06AM PDT, ID: 23591310 | Points: 250 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: |
#include <windows.h> #include <process.h> char *program = "C:\\Windows\\Notepad.exe"; char *image = "C:\\Dog.jpg"; char *url = "http://www.disneyland.com/"; // Works fine, all 3 launched immediately: int show = SW_SHOWNORMAL; ShellExecute(NULL,NULL,program,NULL,NULL,show); ShellExecute(NULL,NULL,image,NULL,NULL,show); ShellExecute(NULL,NULL,url,NULL,NULL,show); // First works fine: (and waits until notepad closes) // The other 2 don't do anything :( spawnv( _P_WAIT, program, NULL ); spawnv( _P_WAIT, image, NULL ); spawnv( _P_WAIT, url, NULL ); |