Search:
Type: Posts; User: VictorN
Search:
Search took 0.32 seconds.
-
April 30th, 2013, 07:03 AM
It only means you set a wrong path/name! Fix it!
-
April 30th, 2013, 06:51 AM
Well, you already mentioned it... two or three times!
And how could it matter?
Did you test the Igor's sample?
-
April 29th, 2013, 03:41 AM
What exactly "doesn't work"?
And how did you try to "setting the service to interact with the desktop"?
-
April 22nd, 2013, 07:00 AM
Well, the one and only one way to hide the window is to call ShowWindow with SW_HIDE for this window (or its parent)
So if you know the handle of the main window of this external program then you...
-
April 22nd, 2013, 06:44 AM
No, you need to create a HOOL dll to hook an external applications!
-
April 22nd, 2013, 06:39 AM
What "c++ console application" are you talking about? What is a problem with a "console application"?
-
April 22nd, 2013, 06:27 AM
No, I cannot. But you could make a Google search for something like global hook WH_CBT example
-
April 22nd, 2013, 06:20 AM
Well, the best way would be to change this external program so it will never call ShowWindow with any but SW_SHOWDEFAULT parameter.
It you cannot change this program then you could try with (WH_CBT)...
-
April 22nd, 2013, 06:03 AM
Good! So now you know a possible reason for the external program to be displayd despite of your startup parameter set to SW_HIDE! :thumb:
-
April 22nd, 2013, 05:50 AM
Where you want to.
But you must be sure (you have to test it!) that this second call is really executed.
-
April 22nd, 2013, 05:41 AM
No. Your initial code with CreateProcess is "almost" correct. You should only change it to
info.dwFlags = STARTF_USESHOWWINDOW;
info.wShowWindow = SW_HIDE;
You have to change your test program...
-
April 22nd, 2013, 05:29 AM
Well, there is onlz one call of ShowWindow in your example.
But according to MSDN article STARTUPINFO:
-
April 22nd, 2013, 05:18 AM
I have a question: who and how is considered to close/exit this program? After you have called CloseHandle there is (almost) no more possible to close the program...
So how long are you going to...
-
April 22nd, 2013, 05:12 AM
Could you show the code snippet with ShowWindow?
Did you test whether this ShowWindow is called?
-
April 22nd, 2013, 04:55 AM
It occusionally "works" with notepad just because notepade does not internally call ShowWindow. (Well, it is IMHO, so, please test if calling ShowWindow(SW_SHOW) would cause the "doesn't work"...
-
April 22nd, 2013, 04:48 AM
Then perform a test: create a very small GUI program (SDI), ensure it calls somewhere the ShowWindow with SW_SHOW or SW_MAXIMIXE or SW_RESTORE parameter, and test your CreateProcess with this program!
-
April 22nd, 2013, 04:38 AM
Does your program call ShowWindow API? With what argument(s)?
-
April 22nd, 2013, 04:33 AM
Define "it doesn't work". :cool:
|
Click Here to Expand Forum to Full Width
|