Forum Discussion

arthurqv's avatar
Occasional Contributor
7 years ago

Trying to use COM control to attach to a running ptocess

I am trying to control AQTime via a COM program. This works fine when I use an aqt project, load it and run it using the Integration Manager. However, when I try to do the same thing by attaching to a running process, the results of the profiler (in my case, the Light Coverage Profiler) are always empty. But if I do the same set of steps inside the AQTime GUI (and also attach to a running process) , I get the results I expect.

The running process is a Java process that calls a C application. When I attach the process in the GUI, I get a warning message:

"AQtime cannot profile Java code by attaching to a process. Only native code will be profiled". I click OK, and all goes well after that.

Could this dialog be the difference between running inside the GUI and running through the COM interface? I only get S_OK from my COM calls.

1 Reply

  • arthurqv's avatar
    Occasional Contributor

    Made some progress. Turns out that using "TakeSnapshot" rather than "get_Results" seems to work better. I still have a problem syncing my 2 apps with AQTime: for example, how can I know when AQTime is finished "getting results" or "exporting results to xml file"? My workaround for now is to add delays, but I wish  (and hope there is) there was a better solution than the software equivalent of "capacitive engineering".