What I wanted to achieve is to call an already running native process from within Adobe AIR. Actually from within Adobe AIR, I wanted to trigger something to already running native process so that it (native process) can take further actions based on input.
What I understood from NativeProcess class that it starts a new native process. So what happens if that process is already running on operating system? Will adobe air interact with already running process or will it start a new process independent of the other already running?
Your help is appreciated. Let me know if I was not clear enough.
Thank you.
Related
I was following the nvprosamples creating the direct display to prevent the OS to affect the usage of it as described in this nvidia sample:
[ddisplay sample][1] [1]: https://github.com/nvpro-samples/gl_render_vk_ddisplay
This was approx one year ago, using Vulkan 1.1, everything was working fine.
After upgrade to 1.3 creation of the swapchain was not possible as it seemed that display was not made available for vulkan api anymore, _device->createSwapchainKHRUnique resulting to eErrorInitializationFailed.
This init error was possible to fix by adding the vkAcquireWinrtDisplayNV call which seems that in new version is somehow making the display available for swapchain (surface), same stuff was added to the new version of the nvidia sample.
The problem is that it seems that after the application finishes the monitor is still hanging in some vacuum, invisible for the OS anymore, the process of the application becomes hanging in the taskmanager, without posibility to kill it anyhow (niether admin forced task kill will work as it will state that no instance of the process is running). Even the computer is not possible to be restarted (as the restart screen hangs indefinitely). The Nvidia's sample is causing the same behaviour as mine app.
Is there any way to return the display back to the OS when application ends withou powering off and on the workstation?
I tried to use vkReleaseDisplayEXT on destruction, but without any success (it is also not used anywhere in the sample code if I am not blind).
I am trying to detect / get notified whenever a new process is created in MAC. The easiest way is to poll all the processes and see if a new process has been launched but that is too time consuming and i wanted to know if i could somehow get some notification whenever a new process is launched using "forked" and "execve". Here is what i have already found :
On how a new process is launched in MAC :
OS X is a variety of Unix. New processes are created with the fork() system call. This creates an almost identical copy of the process that makes the call (the difference is that fork returns 0 in the child and the pid of the child in the parent). It's then normal to use one of the exec() syscalls in the child to transform the child into a process running a different executable.
How is new application launched on Mac?
On getting the list of all processes through polling
http://www.cocoabuilder.com/archive/cocoa/92971-bsd-processes-with-code.html
I have also gone through kAuth kext thing, but it seems beyond my level unless i have some example code for made simple so that i can understand on how to generate the kext and use it in a sample app.
https://developer.apple.com/library/mac/technotes/tn2127/_index.html
NSWorkspace has a notifier but that is only true for applications and not for all processes.
Any tutorial/ sample code with some basic understanding on how to go about this problem, will be greatly appreciated.
My app before first run need execute same code. Is possible move this to installer?
No. iOS apps are installed with Apple's App Store installation process. Apple does not offer any hooks into the installation process to inject code. The app will have to execute this first run code at first run.
If this first run work is significant, and you want to move the work to the install process because it blocks the UI during first run, you can do some things to alleviate the problem. First, you can put this code on its own thread, and let the main thread start the UI. You can then jump to asking for the user to enter settings, or go through help screens explaining the program. While the user is working through these tasks with low computing resource demands, the higher demand setup thread may have plenty of time to do the first run work.
I have a Window Forms application (using clickonce installation, running on a terminal server) that occasionaly ends up with a thread that appears to be running in a tight loop. The user doesn't know this happens as the app continues to run as expected. Also I have determined that I can kill the problem thread without any apparent affect on the app.
I can use Process Explorer to find the instance of an app with the problem and can isolate the thread with the problem but haven't found any way to look into the thread to find anything that would help me determine what is causing the problem. Does anyone know of a way to some additional information about a thread, like maybe strings, that would help me zero in on the issue?
Thanks,
Dave
Haven't tried this myself but "Process Monitor" claims it "shows real-time file system, Registry and process/thread activity"
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Hope this helps.
You should be able to attach Visual Studio to the running process to get more information. Provided the .pdb files are included with the application and you have source code for the avialable version you should be able to use the Threads window combined with pausing / stepping through to see just what the code is doing.
Can Adobe Air be used to track other windows? I want to build an application that tracks how long certain windows have been open. Is this possible?
I'm just going to give you the blunt answer: No.
It's possible to take advantage of native processes in AIR. If a process could track of what you want and report to your AIR app, this might be possible. By reporting I mean your AIR app will trigger the native process you'll deploy with your package.