04-17-2012 12:34 PM
Windows 7 64-bit
Application coded in C++ (Visual Studion 2010 compiler).
We have 3 Windows processes in our application:
1- Laucher (started by a Windows Service, by the user "starter")
2- Core (started by the Laucher, so it is also ran by the user "starter")
3- Gui (started by the user "xxx", which is the user that is currently logged-on)
The Gui application connects to the Core by RPC (Remote Process Calls).
The Core application uses the RFSA driver to acquire RF signal with a PXIe-5663 VSA.
We have the fallowing problem:
When the GUI sends a command to the Core process to initiate the RFSA driver (Core is calling niRFSA_InitWithOptions), we have pop-up message from Windows indicating:
"a program running on this computer is trying to display a message" (See Attachement)
After searching, we found-out that:
This pop-up occurs because the Core is trying to present a window to the screen. But since the Core program is running as the user "starter", the window can not be displayed. The Windows Service "Interactive Service Detection" pops a message to let the user decide if he wishes to display the window.
When we click on "View the Message", the screen resolution changes, but there is nothing. It seems that the Core program is trying to display a transpartent window, or a window outside the screen, etc...
We came to the conclusion that window that Core wants to display comes from the NI Driver. The pop-up EXACTLY occurs during the call to niRFSA_InitWithOptions. It never occurs if we bypass the call to "niRFSA_InitWithOptions"
If we start the processes "Laucher" and "Core" manually, as the user "xxx", we don't get the pop-up from Windows.
So, my question is:
Is this a known "issue" from the NI driver, where a non-visible window is poped-up during the call to niRFSA_InitWithOptions?
Is there a way to configure the RFSA driver in order to disable this "message"?
04-19-2012 10:03 AM
Thanks for posting. What inputs are you providing to the niRFSA_InitWithOptions function? Also, how are you handling errors that might occur with RFSA and how are you storing and presenting them to the user? My first thought is, what happens when an error that occurs from RFSA functions and how will they react within your services.
Next, can you use NI I/O Trace to monitor hardware calls sent from your program? That way, we should be able to see what low-level functions are being used when the Windows dialog box appears. Also, can you explain why you are setting up your application with three processes in this way? Some context for your application might be helpful as well.
04-19-2012 01:18 PM
Thanks for your quick answer.
Here are more details:
We use niRFSA_InitWithOptions with the next string:
When I see the problem (windows pop-up), there is no error or warning coming out of niRFSA_InitWithOptions (value returned is 0).
I have used NI IO Trace to track all my NI calls. There is no more information than what we usually see when everything is normal.
I have also used DebugView to see any Windows Debug/Error messages, but again, everything is fine.
We use the approach I have described, because we want to launch the core process when there is no user session running on the computer.
It is very strange that, when we call niRFSA_InitWithOptions, the process "tries to display a message".
But! We have found another work-around: our service is now using the "Local System Account", instead of the account of user "xxx". When we go in the Service's properties, we can check "Allow process to interact with desktop". By doing this, we don't see the Windows pop-up "A programm is trying to display a message" anymore.
This is an acceptable solution for us.
But we still feel and think that there is something wrong in the NI RFSA driver when calling niRFSA_InitWithOptions.
04-20-2012 02:16 PM
Glad to hear that you have found an acceptable workaround for this issue. As for what might have been causing it, we would definitely be willing to investigate the issue further. However, in order to do so we would need to get more information from you to reproduce it on our end. A portion of your code that we could use to create the same condition (if not all of it) would be necessary so that our developers can probe the issue. I understand if you are satisfied with having this workaround, however, if this is something that you would like to work with us on to improve we will be glad to do so.
04-23-2012 06:10 AM
Thanks again for your answer.
Well, I got some bad news: our work-around doesn't work. We still see the pop-up "a Program is trying to display a message...".
I know that my application and setup is quite complicated. I will try to find a way to simplifiy it, and give you the source code of an example reproducing the problem.