After that, from Desktop, right click "My Computer" then select "Open". If I close this Windows Explorer, my hidden windows is disappeared.??? (they all have the same class name, "CabinetWClass" ). Do you have any idea about this?
2. Is it safe if I do as below:
- Check all windows to find Windows Explorer (by using EnumWindows).
- If not found -> create hidden windows explorer again:
Expand|Select|Wrap|Line Numbers
- if( !CreateProcess( NULL, // No module name (use command line)
- szCmdline,
- NULL,
- NULL,
- FALSE,
- 0,
- NULL,
- NULL,
- &si,
- &pi )
- )
- {
- printf( "CreateProcess failed (%d).\n", GetLastError() );
- return;
- }
- // Do not use WaitForSingleObject( pi.hProcess, INFINITE ) here is ok?
- CloseHandle( pi.hProcess );
- CloseHandle( pi.hThread );
Many thanks for your help.