last day (14 days later) » 

10:29 AM
1
Q: How see a GUI software in a new Desktop created by CreateDesktop api?

Saulo I have a Client-Server software and i able to execute my Client.dll ( by dll injection method ) with sucess to new desktop created with CreateDesktop api, but i'm can see only a white screen on server side. So, i ask to you. - How execute any program on new desktop created and see this program...

 
Does the client server part matter? Does the injection matter? If so then where is it? If not, can you provide a single complete Minimal, Complete, and Verifiable example so that we have the exact same program as you. Also, why do you neglect to check for errors? Perhaps some of these API calls are failing.
 
user6828073
You don't was able to read with attention my question above, for understand. ALL CODE ABOVE WORKS FINE. I want know only how see screen of program that is executed in WinSta0 already that is called by Client.dll that already also is on new desktop. Here on Server side, i can see only a white screen! :-(. So how solve it?
 
Please don't shout. Why doesn't your code check return values for errors? Can we have a Minimal, Complete, and Verifiable example please.
 
user6828073
If it had returned some error, i had showed on question.
 
You wouldn't know if there was an error because you don't check for errors. Can the have the Minimal, Complete, and Verifiable example?
 
user6828073
10:29 AM
I will ignore yours comments from now. Sorry.
 
I guess you are therefore doomed never to learn how to check for errors. You can't learn until you realise you have something to learn. Too bad.
 
user6828073
@DavidHeffernan, i kow that you is a inteligent man and already contributed with S.O, but here now, you don't is giving me inteligent comments. Sorry.
 
Can we have a MCVE
 
user6828073
I made a check for errors and not displays none. And CreateProcess api returns -1 = SUCCESS. I want know if Is possible copy original desktop to new desktop, then i can have a GUI on new desktop and disappear this white screen.
 
Can we have a MCVE please
 
user6828073
10:29 AM
All main code is above, i not have a other part more important like this.
 
I can't execute the code as it stands. I could if I had a MCVE. How can I help you if I can't execute the code?
 
user6828073
What's part do you need to execute? Dll Injector for example? Say me please.
 
user6828073
I will edit my question with a example of a Client-Server screen capture and also will post my Dll injector code that i using. Wait
 
It would be better if there was no injection. The M in MCVE means minimal.
 
user6828073
Done. I edited the question.
 
10:29 AM
Hard to debug.. I had a hard time convincing XE2 to attach the process on the other desktop and break. Anyway, your BitBlt is failing with ERROR_INVALID_HANDLE. Not much help about the solution, I know. Some time in the near future you'll appreciate checking for api errors. ;)
 
user6828073
@SertacAkyuz, this is only a minimal example that was requested to me. Don't is my real application, but in my application, comes a white screen like you can see above. So my trouble is this >> white on screen capture. How solve?
 
Code is unreadable due to indentation. It's incomplete. Can't compile as is. Why do we need socket comms.
 
user6828073
Here is compiling normally. Was used Delphi 7.
 
user6828073
I want know if Is possible copy original desktop to new desktop?
 
@Saulo, You have a white screen capture because your bitmap is empty because the BitBlt call fails, as I commented. I don't know why it fails, hence I don't know the solution.
 
 
2 hours later…
12:06 PM
So, the answer to your question is "switch to that desktop".
 

last day (14 days later) »