Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7405439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:24:15+00:00 2026-05-29T05:24:15+00:00

I am setting up a scratch desktop to run another application in a silent

  • 0

I am setting up a scratch desktop to run another application in a “silent mode” – the other app is noisy and throws all sorts of windows around while it processes.

I have used the info here: CreateDesktop() with vista and UAC on (C, windows)

and CreateDesktop works – I can create the other desktop, I can launch the application into the other desktop (I see it launching in task manager) – but when I try to interact with the app via DDE, the DdeConnect call hangs until it times out.

And here’s how I’m calling CreateDesktop:

                LPSTR desktopName = "MYDESKTOPNAME";
                HDESK hDesk = CreateDesktop(desktopName , NULL, NULL, 0, DESKTOP_SWITCHDESKTOP|
                                          DESKTOP_WRITEOBJECTS|
                                          DESKTOP_READOBJECTS|
                                          DESKTOP_ENUMERATE|
                                          DESKTOP_CREATEWINDOW|
                                          DESKTOP_CREATEMENU, NULL);

Here is CreateProcess to actually launch the app into the new desktop:

                STARTUPINFO startupInfo;
                GetStartupInfo(&startupInfo);
                startupInfo.lpDesktop = desktopName;

                PROCESS_INFORMATION procInfo;
                memset(&procInfo, 0, sizeof(procInfo));


                if (CreateProcess(NULL, exePath, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &startupInfo, &procInfo)){
                    WaitForInputIdle(procInfo.hProcess, INFINITE);
                    CloseHandle(procInfo.hProcess);
                    CloseHandle(procInfo.hThread);
                }

If it matters, the call to DdeInitialize:

DWORD afCmd = APPCLASS_STANDARD | APPCMD_CLIENTONLY | CBF_SKIP_ALLNOTIFICATIONS;
UINT rslt = ::DdeInitialize(&ddeInst, NULL, afCmd, 0);

Here is the DdeConnect call (the hsz* parameters, etc… are all fine – if I launch the app into the regular desktop, the calls all work perfectly).

        hConv = ::DdeConnect(ddeInst,
                               hszService,
                               hszTopic,
                               NULL);

This call just hangs for ~60 seconds.

Is this a security issue of some sort? i.e. the windows messages aren’t passing between desktops? Or does anyone have any suggestion on how to troubleshoot this further?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:24:16+00:00Added an answer on May 29, 2026 at 5:24 am

    The documentation for CreateDesktop contains a cross-reference to the Desktops topic, which says

    Window messages can be sent only between processes that are on the same desktop.

    The overview topics are important. They provide background information to help you understand the feature.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setting up a Windows based web application on Amazon's cloud has definitely been a
I'm setting up my team's source control + build/integration process from scratch. We were
Setting up new git installations. On one Windows laptop, I'm running (under cygwin): git
Setting the scene: My asp.net web application carries a version number which is incremented
I have very little experience with setting up a website from scratch in a
I'm in the process of setting up a webserver from scratch, mainly for writing
Building a lottery scratch-card app in Java. Have allot of it done, just need
I've been learning and building an Android application from scratch and I've hit a
I was trying to create a tab bar based application from scratch but I'm
Setting up an integration server, I’m in doubt about the best approach regarding using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.