RFH: winetest testing
Kevin Koltzau
kevin at plop.org
Wed Apr 21 17:42:34 CDT 2004
On Wednesday 21 April 2004 06:07 pm, Ferenc Wagner wrote:
> Er, I don't know. Winetest itself doesn't really need it,
> but WinRash (the service) couldn't execute it otherwise. We
> don't understand this. Apart from this, winetest has
> console mode, when it doesn't display a gui but logs into
> its console. I couldn't find a way to presen gui or
> console mode based on a command line option (I asked on
> Win32 programmers' forum, the only solution was XP only.)
Something along these lines can be used to have a console app
"detach" from its console..not extremely elegant but it does seem to work
void main(int argc, char *argv[]) {
if(argc < 2) {
char buff[1024];
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
sprintf(buff, "%s /stage2", argv[0]);
CreateProcess(NULL, buff, NULL, NULL, FALSE,
DETACHED_PROCESS, NULL, NULL, &si, &pi);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
else
MessageBox(NULL, "Test", "test", MB_OK);
}
More information about the wine-devel
mailing list