Facing problem while running the microstation in background mode (invisible mode).

Hi All,

I have created a virtual desktop and then I am doing createprocess to run the microstation in background mode.

Following is the code snippet to create a desktop:

-----------------------------------------------------------------------------------------------------------------

 LPWSTR desktopName = L"MyDesktop";
 m_startInfo.lpDesktop = desktopName;

CreateDesktop (desktopName, NULL, NULL, 0, MAXIMUM_ALLOWED, NULL);

m_startInfo.lpDesktop = L"WinSta0\\MyDesktop";
-------------------------------------------------------------------


It is working fine unless there are no prompts from microstation. 
If there is a prompt, Microstation will be idle in the task manager 
because the prompts are also invisible. 
Can anyone please help me to make the prompts visible while the microstation is invisible.


Thanks in advance.
Parents
  • Pasu,

    I see "what" you are doing and can hazard a guess as to "why"; however you are walking on a slippery slope.

    Allow me to restate the problem you described just to be sure I understand:
    You are creating a secondary, "background/inactive" (or more precisely "non-interactive"), desktop and associating the process to that desktop so it is "invisible" and running in the background.
    Everything appears to work as desired except when MicroStation displays a prompt waiting for input.
    In which case, since it is running in an inactive desktop you never know about it on your active desktop so it just sits there waiting for input that will never come.
    Correct?

    If that is the case then the answer is: it is working exactly as designed.
    Microsoft intentionally isolates one desktop from another and runs them in different ACL/Security contexts.
    Since you can only have one Interactive Desktop active at any given time, then the "inactive" one in the background will be sitting idle displaying a prompt and waiting for input until someone "activates" it and responds. That is the way it was designed.

    If you desire to push a dialog from an inactive desktop to the active desktop you must handle all of that explicitly.
    It requires ACL's to be preconfigured to permit it, special security permissions granted to the process which then must be explicitly requested and exercised at run-time. This isn't something you can effectively do with a third party window (in this case Microstation). This is really only practical if you wrote the application and adjusted your window classes to explicitly behave this way. Also, it varies quite a lot on which operating system you are using.

    The typical answer is "you can't", or more accurately it is definately not worth the effort. This is what third party Desktop handlers, such as nView, are for. Or even better, use a virtual machine.

    Hope this helps,
    -G-

Reply
  • Pasu,

    I see "what" you are doing and can hazard a guess as to "why"; however you are walking on a slippery slope.

    Allow me to restate the problem you described just to be sure I understand:
    You are creating a secondary, "background/inactive" (or more precisely "non-interactive"), desktop and associating the process to that desktop so it is "invisible" and running in the background.
    Everything appears to work as desired except when MicroStation displays a prompt waiting for input.
    In which case, since it is running in an inactive desktop you never know about it on your active desktop so it just sits there waiting for input that will never come.
    Correct?

    If that is the case then the answer is: it is working exactly as designed.
    Microsoft intentionally isolates one desktop from another and runs them in different ACL/Security contexts.
    Since you can only have one Interactive Desktop active at any given time, then the "inactive" one in the background will be sitting idle displaying a prompt and waiting for input until someone "activates" it and responds. That is the way it was designed.

    If you desire to push a dialog from an inactive desktop to the active desktop you must handle all of that explicitly.
    It requires ACL's to be preconfigured to permit it, special security permissions granted to the process which then must be explicitly requested and exercised at run-time. This isn't something you can effectively do with a third party window (in this case Microstation). This is really only practical if you wrote the application and adjusted your window classes to explicitly behave this way. Also, it varies quite a lot on which operating system you are using.

    The typical answer is "you can't", or more accurately it is definately not worth the effort. This is what third party Desktop handlers, such as nView, are for. Or even better, use a virtual machine.

    Hope this helps,
    -G-

Children
No Data